summaryrefslogtreecommitdiffstats
path: root/source/printing
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-01-07 06:21:56 +0000
committerJeremy Allison <jra@samba.org>1998-01-07 06:21:56 +0000
commit28aff043c4a3693a0c20e87c7ce11eb4bf285b78 (patch)
treecaa3bf7cd5cf65610d3f8f8fe5c233cf106e97c8 /source/printing
parent800510a852db046bf88a88c966c80d71b474f4ef (diff)
downloadsamba-28aff043c4a3693a0c20e87c7ce11eb4bf285b78.tar.gz
samba-28aff043c4a3693a0c20e87c7ce11eb4bf285b78.tar.xz
samba-28aff043c4a3693a0c20e87c7ce11eb4bf285b78.zip
includes.h: Added FreeBSD 3.x fixes. Added HPUX10.x fixes.
interface.c: Added netmask fix. nmbd_nameregister.c: Fixed unitialised variable warnings. nmbd_winsproxy.c: Fixed unitialised variable warnings. nmbd_winsserver.c: Fixed DEC warnings. print_svid.c: Fixed DEC warnings. printing.c: Added LPRng fixes. Jeremy.
Diffstat (limited to 'source/printing')
-rw-r--r--source/printing/print_svid.c4
-rw-r--r--source/printing/printing.c24
2 files changed, 26 insertions, 2 deletions
diff --git a/source/printing/print_svid.c b/source/printing/print_svid.c
index 5b98036e08e..bf48954ec23 100644
--- a/source/printing/print_svid.c
+++ b/source/printing/print_svid.c
@@ -64,11 +64,11 @@ static void populate_printers()
/* truncate the ": ..." */
if ((tmp = strchr(name, ':')) != NULL)
- *tmp = NULL;
+ *tmp = '\0';
/* add it to the cache */
if ((ptmp = malloc(sizeof (*ptmp))) != NULL) {
- memset(ptmp, NULL, sizeof (*ptmp));
+ memset(ptmp, '\0', sizeof (*ptmp));
ptmp->name = strdup(name);
ptmp->next = printers;
printers = ptmp;
diff --git a/source/printing/printing.c b/source/printing/printing.c
index ccca91a2531..76b962606b7 100644
--- a/source/printing/printing.c
+++ b/source/printing/printing.c
@@ -320,6 +320,23 @@ Printer: humprn@hum-fak (printing disabled)
Status: finished operations at Fri Jun 21 10:10:32 1996
Rank Owner Class Job Files Size Time
1 magnus@hum-fak A 387 /var/spool/smb/netbudget.xls 21230 10:50:53
+
+******************************************************************************
+
+NEW FOR LPRng-3.3.5 !
+
+<reinelt@eunet.at>
+This will not happen anymore: with LPRng-3.3.5 there is always a blank between
+the filename and the size, and the format has changed:
+
+Printer: lj6@lizard 'HP LaserJet 6P'
+ Queue: 2 printable jobs
+ Server: pid 11941 active
+ Unspooler: pid 11942 active
+ Status: printed all 1818 bytes at 19:49:59
+ Rank Owner/ID Class Job Files Size Time
+active root@lizard+937 A 937 (stdin) 1818 19:49:58
+2 root@lizard+969 A 969 junk.txt 2170 19:50:12
****************************************************************************/
static BOOL parse_lpq_lprng(char *line,print_queue_struct *buf,BOOL first)
@@ -367,6 +384,12 @@ LPRng source changes. This is from version 2.3.0. Magnus */
string tok[LPRNG_NTOK];
int count=0;
+#ifdef OLD_LPRNG
+/* We only need this bugfix for older versions of lprng - current
+ information is that version 3.3.5 must not have this line
+ in order to work correctly.
+*/
+
/*
Need to insert one space in front of the size, to be able to use
next_token() unchanged. I would have liked to be able to insert a
@@ -378,6 +401,7 @@ A long spool-path will just waste significant chars of the file name.
*/
line[JOBSIZE_POS-1]=' ';
+#endif /* OLD_LPRNG */
/* handle the case of "(stdin)" as a filename */
string_sub(line,"stdin","STDIN");