summaryrefslogtreecommitdiffstats
path: root/source/printing
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-04-13 19:12:06 +0000
committerJeremy Allison <jra@samba.org>2001-04-13 19:12:06 +0000
commitfc76681812b1469208ad6c8847afdfc68bc6db49 (patch)
tree016255c268fa14d259facf86e8b4c9ec357d0006 /source/printing
parent4f06373bc450b27692619ae877d29767ad160297 (diff)
downloadsamba-fc76681812b1469208ad6c8847afdfc68bc6db49.tar.gz
samba-fc76681812b1469208ad6c8847afdfc68bc6db49.tar.xz
samba-fc76681812b1469208ad6c8847afdfc68bc6db49.zip
Merge of Andrew's changes in 2.2.
Jeremy.
Diffstat (limited to 'source/printing')
-rw-r--r--source/printing/print_generic.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/source/printing/print_generic.c b/source/printing/print_generic.c
index 45c9d445e8b..eff394593ce 100644
--- a/source/printing/print_generic.c
+++ b/source/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 */