2006-01-08 15:30:01 +01:00
|
|
|
$NetBSD: patch-af,v 1.7 2006/01/08 14:30:01 tron Exp $
|
1999-10-01 09:49:19 +02:00
|
|
|
|
2006-01-08 15:30:01 +01:00
|
|
|
--- compface/uncmain.c.orig 1991-10-24 03:28:07.000000000 +0100
|
|
|
|
+++ compface/uncmain.c 2006-01-08 14:24:41.000000000 +0000
|
1999-10-01 07:09:14 +02:00
|
|
|
@@ -18,6 +18,8 @@
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include "compface.h"
|
|
|
|
|
|
|
|
+extern int xbitmap;
|
|
|
|
+
|
|
|
|
/* the buffer is longer than needed to handle sparse input formats */
|
|
|
|
#define FACEBUFLEN 2048
|
|
|
|
char fbuf[FACEBUFLEN];
|
2006-01-08 15:30:01 +01:00
|
|
|
@@ -33,12 +35,21 @@
|
2000-09-06 14:31:50 +02:00
|
|
|
|
|
|
|
/* error handling definitions follow */
|
|
|
|
|
2005-12-19 16:15:47 +01:00
|
|
|
-extern int errno, sys_nerr;
|
2000-09-06 14:31:50 +02:00
|
|
|
+#include <errno.h>
|
2005-12-19 16:15:47 +01:00
|
|
|
+#include <stdio.h>
|
|
|
|
+
|
2006-01-08 15:30:01 +01:00
|
|
|
+#if !defined(__NetBSD__) && !defined(__INTERIX) && !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__APPLE__)
|
2005-12-19 16:15:47 +01:00
|
|
|
+extern int sys_nerr;
|
2000-09-06 14:31:50 +02:00
|
|
|
extern char *sys_errlist[];
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
extern void exit P((int)) ;
|
|
|
|
|
2005-03-15 04:59:38 +01:00
|
|
|
+#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));
|
2006-01-08 15:30:01 +01:00
|
|
|
@@ -60,6 +71,13 @@
|
1999-10-01 07:09:14 +02:00
|
|
|
if (*((*argv)++) == '/')
|
|
|
|
cmdname = *argv; /* find the command's basename */
|
2005-12-19 16:15:47 +01:00
|
|
|
|
1999-10-01 07:09:14 +02:00
|
|
|
+ if (argc > 1 && !strcmp(argv[1], "-X"))
|
|
|
|
+ {
|
|
|
|
+ xbitmap++;
|
|
|
|
+ argc--;
|
|
|
|
+ argv++;
|
|
|
|
+ }
|
2005-12-19 16:15:47 +01:00
|
|
|
+
|
1999-10-01 07:09:14 +02:00
|
|
|
if (argc > 3)
|
|
|
|
{
|
2005-12-19 16:15:47 +01:00
|
|
|
INITERR("usage: ")
|