diff options
author | Jeremy Allison <jra@samba.org> | 2002-07-02 06:34:27 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-07-02 06:34:27 +0000 |
commit | 82176f4d85225c2aae15f9ce3e03730f019934f5 (patch) | |
tree | 3a5ba0496d1e49c3c9c21de5b1fa4d8c56d593c1 /source3/printing | |
parent | 9674ec6987a002ebdcfedeac4d66a096a1007bef (diff) | |
download | samba-82176f4d85225c2aae15f9ce3e03730f019934f5.tar.gz samba-82176f4d85225c2aae15f9ce3e03730f019934f5.tar.bz2 samba-82176f4d85225c2aae15f9ce3e03730f019934f5.zip |
Address the string_sub problem by changing len = 0 to mean "no expand".
Went through and checked all string_subs I could to ensure they're being
used correctly.
Jeremy.
(This used to be commit 17cae0d683be404be69554cd0e84117bdcc56c87)
Diffstat (limited to 'source3/printing')
-rw-r--r-- | source3/printing/lpq_parse.c | 16 | ||||
-rw-r--r-- | source3/printing/print_generic.c | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/source3/printing/lpq_parse.c b/source3/printing/lpq_parse.c index 9d8b1cc2aa..5deb85425e 100644 --- a/source3/printing/lpq_parse.c +++ b/source3/printing/lpq_parse.c @@ -314,7 +314,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 +431,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 +469,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 +593,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 +656,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 +726,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++) ; diff --git a/source3/printing/print_generic.c b/source3/printing/print_generic.c index e1517c5dcb..a32521c721 100644 --- a/source3/printing/print_generic.c +++ b/source3/printing/print_generic.c @@ -78,7 +78,7 @@ static int print_run_command(int snum,char *command, int *outfd, ...) p = PRINTERNAME(snum); pstring_sub(syscmd, "%p", p); - standard_sub_snum(snum,syscmd); + standard_sub_snum(snum,syscmd,sizeof(syscmd)); ret = smbrun(syscmd,outfd); |