Lines Matching refs:index
115 void shell_run_built_in_command(int index, int argc, char **argv) in shell_run_built_in_command() argument
117 if (index >= total_built_in_cmd_num) in shell_run_built_in_command()
121 shell_cmds[index].func(argc, argv); in shell_run_built_in_command()
154 int index = current_dir_len - 1; in shell_cmd_cd() local
155 for (; index > 1; --index) in shell_cmd_cd()
157 if (shell_current_path[index] == '/') in shell_cmd_cd()
160 shell_current_path[index] = '\0'; in shell_cmd_cd()
619 int index = 0; // 当前访问的是buf的第几位 in parse_command() local
621 while (index < INPUT_BUFFER_SIZE && buf[index] == ' ') in parse_command()
622 ++index; in parse_command()
624 if (!buf[index]) in parse_command()
628 for (int i = index; i < (INPUT_BUFFER_SIZE - 1); ++i) in parse_command()
643 for (int i = 0; i < *argc && index < INPUT_BUFFER_SIZE; ++i) in parse_command()
646 *((*argv) + i) = &buf[index]; in parse_command()
647 while (index < (INPUT_BUFFER_SIZE - 1) && buf[index] && buf[index] != ' ') in parse_command()
648 ++index; in parse_command()
649 buf[index++] = '\0'; in parse_command()
652 while (index < INPUT_BUFFER_SIZE && buf[index] == ' ') in parse_command()
653 ++index; in parse_command()