Change nsh to vip

This commit is contained in:
Night Kaly 2024-11-12 12:26:51 +00:00
parent 0ce56aff2e
commit f6fe9a2982
Signed by: night0721
SSH key fingerprint: SHA256:B/hgVwUoBpx5vdNsXl9w8XwZljA9766uk6T4ubZp5HM

4
ccc.c
View file

@ -911,12 +911,12 @@ void show_file_content(void)
dup2(pipe_fd[1], STDOUT_FILENO);
dup2(pipe_fd[1], STDERR_FILENO);
close(pipe_fd[1]);
execlp("nsh", "nsh", current_file.name, NULL);
execlp("vip", "vip", "-c", current_file.name, NULL);
}
_exit(1);
} else if (pid > 0) {
/* 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]);
char buffer[4096];
int row = 1;