$NetBSD: patch-af,v 1.5 2005/03/15 03:59:38 tv Exp $ --- compface/uncmain.c.orig Wed Oct 23 22:28:07 1991 +++ compface/uncmain.c @@ -18,6 +18,8 @@ #include #include "compface.h" +extern int xbitmap; + /* the buffer is longer than needed to handle sparse input formats */ #define FACEBUFLEN 2048 char fbuf[FACEBUFLEN]; @@ -33,12 +35,20 @@ char *cmdname; /* error handling definitions follow */ +#if defined(__NetBSD__) || defined(__INTERIX) +#include +#else extern int errno, sys_nerr; extern char *sys_errlist[]; +#endif extern void exit P((int)) ; +#ifdef __INTERIX +#define ERR strerror(errno) +#else #define ERR ((errno < sys_nerr) ? sys_errlist[errno] : "") +#endif #define INITERR(s) {(void)strcpy(fbuf, cmdname); (void)strcat(fbuf, ": ");\ (void)strcat(fbuf, (s));} #define ADDERR(s) (void)strcat(fbuf, (s)); @@ -59,6 +69,13 @@ char *argv[]; while (**argv) if (*((*argv)++) == '/') cmdname = *argv; /* find the command's basename */ + + if (argc > 1 && !strcmp(argv[1], "-X")) + { + xbitmap++; + argc--; + argv++; + } if (argc > 3) {