summaryrefslogtreecommitdiffstats
path: root/source/printing/printing.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-08-13 08:57:55 +0000
committerAndrew Tridgell <tridge@samba.org>1996-08-13 08:57:55 +0000
commitaa6f8b04d125b5bc00f267abf72b800228aabf7d (patch)
tree9d649627d1930e869025642b4bec2b08fb814b52 /source/printing/printing.c
parentfe0f5d44e20599679d392eeda34a58769378fbbf (diff)
downloadsamba-aa6f8b04d125b5bc00f267abf72b800228aabf7d.tar.gz
samba-aa6f8b04d125b5bc00f267abf72b800228aabf7d.tar.xz
samba-aa6f8b04d125b5bc00f267abf72b800228aabf7d.zip
- sequent-ptx support from bressler@iftccu.ca.boeing.com (Rick
Bressler) - machten support from Trevor Strohman (trev@figment.tenon.com) - added qinfo command to client as part of drag-and-drop printer support for win95 from David Chappell <chappell@mouse.cc.trincoll.edu> He also added the "printer driver" option - use sigblock() on more systems and use sigsetmask(0) instead of sigunblock() as its more portable. This beats a problem with zombies on heavilily loaded systems. - added internals.doc written by David Chappell into the source tree - get rid of PRINT_COMMAND options from local.h as they are no longer relevent - new kanji code from Fujita - don't set the recursion_available flag on queries in nmbd - fix a potential bug with pointer subtraction in printing.c - got rid of error_count code as the real fix (the EOF problem) is now in
Diffstat (limited to 'source/printing/printing.c')
-rw-r--r--source/printing/printing.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/printing/printing.c b/source/printing/printing.c
index 2eef0d303bc..7ffded8e91e 100644
--- a/source/printing/printing.c
+++ b/source/printing/printing.c
@@ -73,7 +73,7 @@ static char *build_print_command(int cnum, char *command, char *syscmd, char *fi
}
if (strstr(syscmd,"%s")) {
- int iOffset = strstr(syscmd, "%s") - syscmd;
+ int iOffset = PTR_DIFF(strstr(syscmd, "%s"),syscmd);
/* construct the full path for the filename, shouldn't be necessary unless
the subshell causes a "cd" to be executed.
@@ -713,6 +713,9 @@ static BOOL parse_lpq_entry(int snum,char *line,
}
#endif
+ /* We don't want the newline in the status message. */
+ line[strcspn(line,"\n")] = (char)NULL;
+
if (status && !ret)
{
/* a few simple checks to see if the line might be a