--- ray/src/px/pflip.c 2019/07/19 17:37:56 2.12 +++ ray/src/px/pflip.c 2025/06/06 19:11:21 2.13 @@ -1,11 +1,12 @@ #ifndef lint -static const char RCSid[] = "$Id: pflip.c,v 2.12 2019/07/19 17:37:56 greg Exp $"; +static const char RCSid[] = "$Id: pflip.c,v 2.13 2025/06/06 19:11:21 greg Exp $"; #endif /* * flip picture file horizontally and/or vertically */ #include "rtio.h" +#include "paths.h" #include "platform.h" #include "color.h" #include "resolu.h" @@ -21,9 +22,7 @@ int correctorder = 0; /* correcting orientation? */ FILE *fin; /* input file */ -char *progname; - static void memerr(void); static void scanfile(void); static void flip(void); @@ -54,9 +53,10 @@ main( { static char picfmt[MAXFMTLEN] = PICFMT; int i, rval; + SET_DEFAULT_BINARY(); SET_FILE_BINARY(stdout); - progname = argv[0]; + fixargv0(argv[0]); for (i = 1; i < argc; i++) if (!strcmp(argv[i], "-h"))