Compare commits

..

No commits in common. "f6fe9a2982ea798242d6c40ae2414eb7c50dd29a" and "3fe500d7611855aaa487459b70b0592baafa188f" have entirely different histories.

2 changed files with 4 additions and 3 deletions

View file

@ -4,6 +4,7 @@
VERSION = 1.0 VERSION = 1.0
TARGET = ccc TARGET = ccc
MANPAGE = $(TARGET).1 MANPAGE = $(TARGET).1
CONF = config.h
PREFIX ?= /usr/local PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man/man1 MANDIR = $(PREFIX)/share/man/man1
@ -14,7 +15,7 @@ CFLAGS = -Os -march=native -mtune=native -pipe -s -flto -std=c99 -pedantic -Wall
SRC = ccc.c util.c file.c icons.c SRC = ccc.c util.c file.c icons.c
$(TARGET): $(SRC) config.h $(TARGET): $(SRC) $(CONF)
$(CC) $(SRC) -o $@ $(CFLAGS) $(LDFLAGS) $(CC) $(SRC) -o $@ $(CFLAGS) $(LDFLAGS)
dist: dist:

4
ccc.c
View file

@ -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("vip", "vip", "-c", current_file.name, NULL); execlp("nsh", "nsh", current_file.name, NULL);
} }
_exit(1); _exit(1);
} else if (pid > 0) { } else if (pid > 0) {
/* Parent */ /* Parent */
if (!strstr(current_file.name, ".jpg") && !strstr(current_file.name, ".png")) { if (strstr(current_file.name, ".jpg") == NULL && strstr(current_file.name, ".png") == NULL) {
close(pipe_fd[1]); close(pipe_fd[1]);
char buffer[4096]; char buffer[4096];
int row = 1; int row = 1;