From f6fe9a2982ea798242d6c40ae2414eb7c50dd29a Mon Sep 17 00:00:00 2001 From: night0721 Date: Tue, 12 Nov 2024 12:26:51 +0000 Subject: [PATCH] Change nsh to vip --- ccc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ccc.c b/ccc.c index 09730e4..12d91f9 100644 --- a/ccc.c +++ b/ccc.c @@ -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;