diff --git a/Makefile b/Makefile index e28e6f9..8086e48 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ CC=cc CFLAGS=-I include/ -I lib/ -Wall RM=rm -f +working: id + all: libraries programs cleanall: clean cleanlibraries cleanprograms diff --git a/src/sysexits.c b/src/sysexits.c index de42539..6fa6b02 100644 --- a/src/sysexits.c +++ b/src/sysexits.c @@ -119,14 +119,13 @@ static int findbyint(int status){ for(i = 0; i < ARRAYLEN(sysexits); ++i) if(sysexits[i].status == status) return i; + return -1; } static void output_comment(int fd, int indentation, int width, char *comment){ size_t word_start; size_t line_start; - return; - for(i = 0, line_start = 0, word_start = 0; ; ++i) switch(comment[i]){ case '\0': @@ -154,7 +153,7 @@ static void output_comment(int fd, int indentation, int width, char *comment){ static void output_header(void){ write(1, header_prefix, ARRAYLEN(header_prefix) - 1); for(i = 0; i < ARRAYLEN(sysexits); ++i){ - output_comment(1, 1 * TAB_WIDTH, 80, sysexits[i].desc); + //output_comment(1, 1 * TAB_WIDTH, 80, sysexits[i].desc); #ifdef ENUM fprintf(stdout, "\t%s = %d%s", sysexits[i].name, @@ -169,6 +168,7 @@ static void output_header(void){ ); #endif /* ifdef DEFINE */ } + fflush(stdout); /* Fixes actual issue. */ write(1, header_suffix, ARRAYLEN(header_suffix) - 1); }