From: Heiga Z. <hei...@us...> - 2007-10-16 02:21:38
|
Update of /cvsroot/sp-tk/SPTK/src/bin/psgr In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv11613/src/bin/psgr Modified Files: psgr.c eps.c Log Message: Arrange spaces for macros. Wrap strrchr() by rindex() if string.h does not exist. Index: eps.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/psgr/eps.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** eps.c 9 Oct 2007 18:39:17 -0000 1.8 --- eps.c 16 Oct 2007 02:20:56 -0000 1.9 *************** *** 56,70 **** #include <time.h> #include <ctype.h> - #include "psgr.h" - - - #if HAS_STDLIB - #include <strings.h> #include <stdlib.h> ! #else ! #include <string.h> ! #include <stdlib.h> ! #endif /* HAS_STDLIB */ ! #define plot_min(x, min, pmin) ((x<min) ? ((x>=pmin)?(x):(pmin)) : (min)) --- 56,61 ---- #include <time.h> #include <ctype.h> #include <stdlib.h> ! #include "psgr.h" #define plot_min(x, min, pmin) ((x<min) ? ((x>=pmin)?(x):(pmin)) : (min)) Index: psgr.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/psgr/psgr.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** psgr.c 9 Oct 2007 09:34:10 -0000 1.13 --- psgr.c 16 Oct 2007 02:20:56 -0000 1.14 *************** *** 65,81 **** #include <stdio.h> #include <stdlib.h> - #include <SPTK.h> - #include "psgr.h" ! char *BOOL[] = {"FALSE", "TRUE"}; ! #if HAS_STDLIB ! #include <strings.h> ! #define RINDEX(s, c) rindex(s, c) #else ! #include <string.h> ! #define RINDEX(s, c) strrchr(s, c) #endif #define MaxPaperTypes 6 /* Paper Media */ --- 65,90 ---- #include <stdio.h> #include <stdlib.h> ! #ifdef HAVE_STRING_H ! # include <string.h> ! #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif ! #endif ! #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif + #include "psgr.h" + + + char *BOOL[] = {"FALSE", "TRUE"}; + + #define MaxPaperTypes 6 /* Paper Media */ *************** *** 166,171 **** progname = *argv; ! if (RINDEX(progname, '/')) ! progname = (char *)(RINDEX(progname, '/') + 1); while (--argc) { if (*(str=*++argv)=='-') { --- 175,180 ---- progname = *argv; ! if (strrchr(progname, '/')) ! progname = (char *)(strrchr(progname, '/') + 1); while (--argc) { if (*(str=*++argv)=='-') { |