Compare commits
No commits in common. "f6fe9a2982ea798242d6c40ae2414eb7c50dd29a" and "3fe500d7611855aaa487459b70b0592baafa188f" have entirely different histories.
f6fe9a2982
...
3fe500d761
2 changed files with 4 additions and 3 deletions
3
Makefile
3
Makefile
|
@ -4,6 +4,7 @@
|
|||
VERSION = 1.0
|
||||
TARGET = ccc
|
||||
MANPAGE = $(TARGET).1
|
||||
CONF = config.h
|
||||
PREFIX ?= /usr/local
|
||||
BINDIR = $(PREFIX)/bin
|
||||
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
|
||||
|
||||
$(TARGET): $(SRC) config.h
|
||||
$(TARGET): $(SRC) $(CONF)
|
||||
$(CC) $(SRC) -o $@ $(CFLAGS) $(LDFLAGS)
|
||||
|
||||
dist:
|
||||
|
|
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], STDERR_FILENO);
|
||||
close(pipe_fd[1]);
|
||||
execlp("vip", "vip", "-c", current_file.name, NULL);
|
||||
execlp("nsh", "nsh", current_file.name, NULL);
|
||||
}
|
||||
_exit(1);
|
||||
} else if (pid > 0) {
|
||||
/* 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]);
|
||||
char buffer[4096];
|
||||
int row = 1;
|
||||
|
|
Loading…
Reference in a new issue