--- ray/src/px/pcompos.c 2003/02/22 02:07:27 2.21 +++ ray/src/px/pcompos.c 2003/11/10 12:28:56 2.26 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: pcompos.c,v 2.21 2003/02/22 02:07:27 greg Exp $"; +static const char RCSid[] = "$Id: pcompos.c,v 2.26 2003/11/10 12:28:56 schorsch Exp $"; #endif /* * pcompos.c - program to composite pictures. @@ -8,17 +8,15 @@ static const char RCSid[] = "$Id: pcompos.c,v 2.21 200 */ #include - #include - -#ifdef MSDOS -#include -#endif - #include +#include -#include "color.h" +#include "copyright.h" +#include "platform.h" +#include "rtprocess.h" +#include "color.h" #include "resolu.h" #define MAXFILE 64 @@ -95,12 +93,9 @@ char *argv[]; int xsgn, ysgn; char *thislabel; int an; -#ifdef MSDOS - extern int _fmode; - _fmode = O_BINARY; - setmode(fileno(stdin), O_BINARY); - setmode(fileno(stdout), O_BINARY); -#endif + SET_DEFAULT_BINARY(); + SET_FILE_BINARY(stdin); + SET_FILE_BINARY(stdout); progname = argv[0]; for (an = 1; an < argc && argv[an][0] == '-'; an++) @@ -387,7 +382,7 @@ register COLR c1, c2; j = 4; /* check exponents first! */ while (j--) - if (i = c1[j] - c2[j]) + if ( (i = c1[j] - c2[j]) ) return(i); return(0); } @@ -398,7 +393,7 @@ lblopen(s, xp, yp) /* open pipe to label generator */ char *s; int *xp, *yp; { - char com[128]; + char com[PATH_MAX]; FILE *fp; sprintf(com, "psign -s -.15 -a 2 -x %d -y %d '%.90s'", *xp, *yp, s);