Lines Matching refs:index
104 void shell_run_built_in_command(int index, int argc, char **argv) in shell_run_built_in_command() argument
106 if (index >= total_built_in_cmd_num) in shell_run_built_in_command()
110 shell_cmds[index].func(argc, argv); in shell_run_built_in_command()
143 int index = current_dir_len - 1; in shell_cmd_cd() local
144 for (; index > 1; --index) in shell_cmd_cd()
146 if (shell_current_path[index] == '/') in shell_cmd_cd()
149 shell_current_path[index] = '\0'; in shell_cmd_cd()
598 int index = 0; // 当前访问的是buf的第几位 in parse_command() local
600 while (index < INPUT_BUFFER_SIZE && buf[index] == ' ') in parse_command()
601 ++index; in parse_command()
604 for (int i = index; i < (INPUT_BUFFER_SIZE - 1); ++i) in parse_command()
619 for (int i = 0; i < *argc && index < INPUT_BUFFER_SIZE; ++i) in parse_command()
622 *((*argv) + i) = &buf[index]; in parse_command()
623 while (index < (INPUT_BUFFER_SIZE - 1) && buf[index] && buf[index] != ' ') in parse_command()
624 ++index; in parse_command()
625 buf[index++] = '\0'; in parse_command()
628 while (index < INPUT_BUFFER_SIZE && buf[index] == ' ') in parse_command()
629 ++index; in parse_command()