From 2ef68c7e92d4661664f0410509f7cb551e74a198 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 13 Apr 2001 19:12:06 +0000 Subject: Merge of Andrew's changes in 2.2. Jeremy. (This used to be commit fc76681812b1469208ad6c8847afdfc68bc6db49) --- source3/printing/print_generic.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) (limited to 'source3/printing/print_generic.c') diff --git a/source3/printing/print_generic.c b/source3/printing/print_generic.c index 45c9d445e8..eff394593c 100644 --- a/source3/printing/print_generic.c +++ b/source3/printing/print_generic.c @@ -54,33 +54,14 @@ run a given print command a null terminated list of value/substitute pairs is provided for local substitution strings ****************************************************************************/ - -#ifdef HAVE_STDARG_H -static int print_run_command(int snum,char *command, int *outfd, char *outfile, ...) -{ -#else /* HAVE_STDARG_H */ -static int print_run_command(va_alist) -va_dcl +static int print_run_command(int snum,char *command, int *outfd, ...) { - int snum; - int *outfd; - char *command, *outfile; -#endif /* HAVE_STDARG_H */ pstring syscmd; char *p, *arg; int ret; va_list ap; - -#ifdef HAVE_STDARG_H - va_start(ap, outfile); -#else /* HAVE_STDARG_H */ - va_start(ap); - snum = va_arg(ap,int); - fd = va_arg(ap, int *); - command = va_arg(ap,char *); - outfile = va_arg(ap,char *); -#endif /* HAVE_STDARG_H */ + va_start(ap, outfd); if (!command || !*command) return -1; @@ -104,7 +85,7 @@ va_dcl /* Convert script args to unix-codepage */ dos_to_unix(syscmd, True); - ret = smbrun(syscmd,outfd,outfile); + ret = smbrun(syscmd,outfd); DEBUG(3,("Running the command `%s' gave %d\n",syscmd,ret)); @@ -214,7 +195,7 @@ static int generic_queue_get(int snum, print_queue_struct **q, print_status_stru int fd; pstring tmp_file; int numlines, i, qcount; - print_queue_struct *queue; + print_queue_struct *queue = NULL; fstring printer_name; /* Convert printer name (i.e. share name) to unix-codepage */ -- cgit