2010-01-06 03:31:53 +01:00
|
|
|
$NetBSD: patch-aa,v 1.2 2010/01/06 02:31:53 obache Exp $
|
2006-02-11 17:49:04 +01:00
|
|
|
|
2010-01-06 03:31:53 +01:00
|
|
|
--- kcc.c.orig 1994-07-01 05:47:48.000000000 +0000
|
2006-02-11 17:49:04 +01:00
|
|
|
+++ kcc.c
|
2010-01-06 03:31:53 +01:00
|
|
|
@@ -27,6 +27,7 @@ static char copyright[] = "@(#)Copyright
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
+#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
@@ -134,7 +135,11 @@ extern unsigned short katakana[];
|
2006-02-11 17:49:04 +01:00
|
|
|
extern unsigned short hiragana[];
|
|
|
|
unsigned short *kanatbl = katakana;
|
|
|
|
|
|
|
|
+#ifdef __STDC__
|
|
|
|
+void error(char *format, ...);
|
|
|
|
+#else
|
|
|
|
void error();
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* *
|
2010-01-06 03:31:53 +01:00
|
|
|
@@ -364,14 +369,26 @@ main(c, v)
|
2006-02-11 17:49:04 +01:00
|
|
|
NAME
|
|
|
|
error - print formatted error message on stderr and die
|
|
|
|
---------------------------------------------------------------------*/
|
|
|
|
+#ifdef __STDC__
|
|
|
|
+#include <stdarg.h>
|
|
|
|
+#else
|
|
|
|
#include <varargs.h>
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
+#ifdef __STDC__
|
|
|
|
+void error(char *format, ...)
|
|
|
|
+#else
|
|
|
|
void error(va_alist)
|
|
|
|
va_dcl
|
|
|
|
+#endif
|
|
|
|
{
|
|
|
|
va_list args;
|
|
|
|
|
|
|
|
+#ifdef __STDC__
|
|
|
|
+ va_start(args, format);
|
|
|
|
+#else
|
|
|
|
va_start(args);
|
|
|
|
+#endif
|
|
|
|
fprintf(stderr, "%s: ", progname);
|
|
|
|
vfprintf(stderr, va_arg(args, char *), args);
|
|
|
|
putc('\n', stderr);
|