summaryrefslogtreecommitdiff
path: root/source3/printing/lpq_parse.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-07-15 10:35:28 +0000
committerAndrew Tridgell <tridge@samba.org>2002-07-15 10:35:28 +0000
commite90b65284812aaa5ff9e9935ce9bbad7791cbbcd (patch)
tree9e744d1dc2f93934a4b49166a37383d3cb2b2139 /source3/printing/lpq_parse.c
parentec167dc9cc0ec2ee461837c25a371d2981744208 (diff)
downloadsamba-e90b65284812aaa5ff9e9935ce9bbad7791cbbcd.tar.gz
samba-e90b65284812aaa5ff9e9935ce9bbad7791cbbcd.tar.bz2
samba-e90b65284812aaa5ff9e9935ce9bbad7791cbbcd.zip
updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
Diffstat (limited to 'source3/printing/lpq_parse.c')
-rw-r--r--source3/printing/lpq_parse.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source3/printing/lpq_parse.c b/source3/printing/lpq_parse.c
index 9d8b1cc2aa..1307cdb3f8 100644
--- a/source3/printing/lpq_parse.c
+++ b/source3/printing/lpq_parse.c
@@ -255,6 +255,8 @@ static BOOL parse_lpq_lprng(char *line,print_queue_struct *buf,BOOL first)
if (strequal(tokarr[LPRNG_RANKTOK],"active")) {
buf->status = LPQ_PRINTING;
+ } else if (strequal(tokarr[LPRNG_RANKTOK],"done")) {
+ buf->status = LPQ_PRINTED;
} else if (isdigit((int)*tokarr[LPRNG_RANKTOK])) {
buf->status = LPQ_QUEUED;
} else {
@@ -314,7 +316,7 @@ static BOOL parse_lpq_aix(char *line,print_queue_struct *buf,BOOL first)
int count=0;
/* handle the case of "(standard input)" as a filename */
- pstring_sub(line,"standard input","STDIN");
+ string_sub(line,"standard input","STDIN",0);
all_string_sub(line,"(","\"",0);
all_string_sub(line,")","\"",0);
@@ -431,7 +433,7 @@ static BOOL parse_lpq_hpux(char * line, print_queue_struct *buf, BOOL first)
}
if (!header_line_ok) return (False); /* incorrect header line */
/* handle the case of "(standard input)" as a filename */
- pstring_sub(line,"standard input","STDIN");
+ string_sub(line,"standard input","STDIN",0);
all_string_sub(line,"(","\"",0);
all_string_sub(line,")","\"",0);
@@ -469,7 +471,7 @@ static BOOL parse_lpq_hpux(char * line, print_queue_struct *buf, BOOL first)
else if (base_prio) base_prio_reset=False;
/* handle the dash in the job id */
- pstring_sub(line,"-"," ");
+ string_sub(line,"-"," ",0);
for (count=0; count<12 && next_token(&line,tok[count],NULL,sizeof(tok[count])); count++) ;
@@ -593,14 +595,14 @@ static BOOL parse_lpq_qnx(char *line,print_queue_struct *buf,BOOL first)
DEBUG(4,("antes [%s]\n", line));
/* handle the case of "-- standard input --" as a filename */
- pstring_sub(line,"standard input","STDIN");
+ string_sub(line,"standard input","STDIN",0);
DEBUG(4,("despues [%s]\n", line));
all_string_sub(line,"-- ","\"",0);
all_string_sub(line," --","\"",0);
DEBUG(4,("despues 1 [%s]\n", line));
- pstring_sub(line,"[job #","");
- pstring_sub(line,"]","");
+ string_sub(line,"[job #","",0);
+ string_sub(line,"]","",0);
DEBUG(4,("despues 2 [%s]\n", line));
@@ -656,7 +658,7 @@ static BOOL parse_lpq_plp(char *line,print_queue_struct *buf,BOOL first)
int count=0;
/* handle the case of "(standard input)" as a filename */
- pstring_sub(line,"stdin","STDIN");
+ string_sub(line,"stdin","STDIN",0);
all_string_sub(line,"(","\"",0);
all_string_sub(line,")","\"",0);
@@ -726,7 +728,7 @@ static BOOL parse_lpq_softq(char *line,print_queue_struct *buf,BOOL first)
int count=0;
/* mung all the ":"s to spaces*/
- pstring_sub(line,":"," ");
+ string_sub(line,":"," ",0);
for (count=0; count<10 && next_token(&line,tok[count],NULL,sizeof(tok[count])); count++) ;