fix compile errors in ptx1, and turn on compiler warnings. Reference: /n/atom/patch/applied/manmkfix Date: Mon Mar 10 17:07:53 CET 2014 Signed-off-by: quanstro@quanstro.net --- /sys/lib/man/permind/mkfile Mon Mar 10 17:07:37 2014 +++ /sys/lib/man/permind/mkfile Mon Mar 10 17:07:37 2014 @@ -7,8 +7,12 @@ permindex:V: $O.ptx1 rm -f junk* - for (i in /sys/man/[0-9]) - makind1 $i >> junk0 + if (test -f sec) + for (i in `{cat sec}) + makind1 $i >> junk0 + if not + for (i in /sys/man/[0-9] /sys/man/[1-9][0-9]) + makind1 $i >> junk0 sed 's/0intro/intro/g s/ +/ /g s/ +$//' junk0 > junk1 @@ -27,7 +31,7 @@ ' junk3 >permindex $O.ptx1: ptx1.c - $CC ptx1.c + $CC $CFLAGS ptx1.c $LD -o $target ptx1.$O -lstdio clean:V: --- /sys/lib/man/permind/ptx1.c Mon Mar 10 17:07:37 2014 +++ /sys/lib/man/permind/ptx1.c Mon Mar 10 17:07:37 2014 @@ -106,6 +106,9 @@ char *bfile; /*contains user supplied break chars */ FILE *bptr; +/* squelch warnings */ +#undef putc + char *cmds; void @@ -265,9 +268,7 @@ remove(kfile); */ fflush(0); - _exits(0); -/* I don't know what's wrong with the atexit func... */ -/* exits(0); */ + exits(0); } void @@ -450,7 +451,7 @@ void getsort(void) { - char *tilde, *linep, *markp; + char *linep, *markp; int i0, i1, i2, i3, i4, i5, i6, i7, w0, w6; if((sortptr = fopen(sortfile, "r")) == NULL)