summaryrefslogtreecommitdiff
path: root/source3/printing/print_generic.c
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
commit2ef68c7e92d4661664f0410509f7cb551e74a198 (patch)
tree7a3ea392bf8664e28ad46b2edb1afd750335ccc9 /source3/printing/print_generic.c
parent14748b0bf56239695cadb6aa40d9095259ebb6e2 (diff)
downloadsamba-2ef68c7e92d4661664f0410509f7cb551e74a198.tar.gz
samba-2ef68c7e92d4661664f0410509f7cb551e74a198.tar.bz2
samba-2ef68c7e92d4661664f0410509f7cb551e74a198.zip
Merge of Andrew's changes in 2.2.
Jeremy. (This used to be commit fc76681812b1469208ad6c8847afdfc68bc6db49)
Diffstat (limited to 'source3/printing/print_generic.c')
-rw-r--r--source3/printing/print_generic.c27
1 files changed, 4 insertions, 23 deletions
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 */