Change nsh to vip
This commit is contained in:
parent
0ce56aff2e
commit
f6fe9a2982
1 changed files with 2 additions and 2 deletions
4
ccc.c
4
ccc.c
|
@ -911,12 +911,12 @@ void show_file_content(void)
|
||||||
dup2(pipe_fd[1], STDOUT_FILENO);
|
dup2(pipe_fd[1], STDOUT_FILENO);
|
||||||
dup2(pipe_fd[1], STDERR_FILENO);
|
dup2(pipe_fd[1], STDERR_FILENO);
|
||||||
close(pipe_fd[1]);
|
close(pipe_fd[1]);
|
||||||
execlp("nsh", "nsh", current_file.name, NULL);
|
execlp("vip", "vip", "-c", current_file.name, NULL);
|
||||||
}
|
}
|
||||||
_exit(1);
|
_exit(1);
|
||||||
} else if (pid > 0) {
|
} else if (pid > 0) {
|
||||||
/* Parent */
|
/* Parent */
|
||||||
if (strstr(current_file.name, ".jpg") == NULL && strstr(current_file.name, ".png") == NULL) {
|
if (!strstr(current_file.name, ".jpg") && !strstr(current_file.name, ".png")) {
|
||||||
close(pipe_fd[1]);
|
close(pipe_fd[1]);
|
||||||
char buffer[4096];
|
char buffer[4096];
|
||||||
int row = 1;
|
int row = 1;
|
||||||
|
|
Loading…
Reference in a new issue