style fixes
This commit is contained in:
parent
6ca7b9e612
commit
01c1259dea
@ -1,22 +1,13 @@
|
||||
CFLAGS = -g
|
||||
RM = rm -f
|
||||
TARGETS = pscat
|
||||
pscat: pscat.o psargs.o
|
||||
$(CC) $(CFLAGS) -g -o pscat psargs.o pscat.o
|
||||
|
||||
all: $(TARGETS)
|
||||
pscat.o: pscat.c
|
||||
$(CC) $(CFLAGS) -c -o pscat.o pscat.c
|
||||
|
||||
psargs.o: psargs.c
|
||||
$(CC) $(CFLAGS) -c -o psargs.o psargs.c
|
||||
|
||||
clean:
|
||||
$(RM) $(TARGETS) *.o
|
||||
rm -f *.o pscat
|
||||
|
||||
debug:
|
||||
$(CC) $(DEBUG) -o pscat pscat.c
|
||||
|
||||
%.o: %.c %.h
|
||||
$(CC) $(CFLAGS) -c -o %.o %.c
|
||||
|
||||
pscat.o: psargs.h pscat.c
|
||||
$(CC) $(CFLAGS) -DUSE_ASCII_H -DDONT_USE_SYSTEM_SYSEXITS -c -o pscat.o pscat.c
|
||||
|
||||
pscat: pscat.o psargs.o
|
||||
$(CC) $(CFLAGS) -o pscat psargs.o pscat.o
|
||||
|
||||
.PHONY: all clean
|
||||
.PHONY: clean
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include <stdio.h>
|
||||
#include <sysexits.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#include <stdio.h> /* fprintf(3), stderr */
|
||||
#include <sysexits.h> /* EX_USAGE */
|
||||
#include <unistd.h> /* execvp(3) */
|
||||
#include <sys/types.h> /* <sys/wait.h> */
|
||||
#include <sys/wait.h> /* wait(2) */
|
||||
|
||||
#include "psargs.h"
|
||||
|
||||
@ -31,7 +32,7 @@ forking(char **argv){
|
||||
|
||||
int main(int argc, char *argv[]){
|
||||
|
||||
if((check_arg(++argv, L_PAREN, R_PAREN)) == 0){
|
||||
if(check_arg(++argv, L_PAREN, R_PAREN) == 0){
|
||||
fprintf(stderr,
|
||||
"Usage: %s \"[\" [utility [argument...]] \"]\" ...\n",
|
||||
argv[-1] == NULL ? program_name : argv[-1]
|
||||
|
Loading…
Reference in New Issue
Block a user