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