|
Added
Link Here
|
| 1 |
--- prn.c.orig Thu May 26 11:37:45 1994 |
| 2 |
+++ prn.c Fri Feb 6 00:18:11 2004 |
| 3 |
@@ -34,8 +34,13 @@ |
| 4 |
#include <sys/stat.h> |
| 5 |
#include "euc.h" |
| 6 |
|
| 7 |
+#if !defined KCCPATH |
| 8 |
#define KCCPATH "/usr/local/bin/kcc" |
| 9 |
-#if defined (__bsdi__) |
| 10 |
+#endif |
| 11 |
+#if (defined(__unix__) || defined(unix)) && !defined(USG) |
| 12 |
+#include <sys/param.h> |
| 13 |
+#endif |
| 14 |
+#if defined (__bsdi__) || (defined(BSD) && (BSD >= 199103)) |
| 15 |
#define LPRPATH "/usr/bin/lpr" |
| 16 |
#else |
| 17 |
#define LPRPATH "/usr/ucb/lpr" |
| 18 |
@@ -48,8 +53,12 @@ |
| 19 |
|
| 20 |
#else |
| 21 |
|
| 22 |
+#if !defined CMTPATH |
| 23 |
#define CMTPATH "/usr/local/bin/cmt" |
| 24 |
+#endif |
| 25 |
+#if !defined PSPATH |
| 26 |
#define PSPATH "/usr/local/bin/psconv" |
| 27 |
+#endif |
| 28 |
|
| 29 |
#endif |
| 30 |
|
| 31 |
@@ -96,7 +105,7 @@ |
| 32 |
static char *filename; /* name of the file being processed */ |
| 33 |
static char *modtime; /* the last modification time */ |
| 34 |
|
| 35 |
-static void error(); |
| 36 |
+static void error(char *, ...); |
| 37 |
static char *basename(); |
| 38 |
static bool formatopt(); |
| 39 |
static bool rangeopt(); |
| 40 |
@@ -498,16 +507,15 @@ |
| 41 |
error(format, arg1, arg2, ...) |
| 42 |
char *format; |
| 43 |
---------------------------------------------------------------------*/ |
| 44 |
-#include <varargs.h> |
| 45 |
+#include <stdarg.h> |
| 46 |
|
| 47 |
-static void error(va_alist) |
| 48 |
- va_dcl |
| 49 |
+static void error(char *a, ...) |
| 50 |
{ |
| 51 |
va_list args; |
| 52 |
|
| 53 |
- va_start(args); |
| 54 |
+ va_start(args, a); |
| 55 |
fprintf(stderr, "%s: ", progname); |
| 56 |
- vfprintf(stderr, va_arg(args, char *), args); |
| 57 |
+ vfprintf(stderr, a, args); |
| 58 |
putc('\n', stderr); |
| 59 |
va_end(args); |
| 60 |
exit(1); |