summaryrefslogtreecommitdiff
path: root/source3/printing/pcap.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-07-04 07:36:09 +0000
committerAndrew Tridgell <tridge@samba.org>2001-07-04 07:36:09 +0000
commit527e824293ee934ca5da0ef5424efe5ab7757248 (patch)
treedd86fab3b0ba9cdbd86661dfae562fa123a8f53c /source3/printing/pcap.c
parent87fbb7092b8f8b2f0db0f361c3d625e19de57cd9 (diff)
downloadsamba-527e824293ee934ca5da0ef5424efe5ab7757248.tar.gz
samba-527e824293ee934ca5da0ef5424efe5ab7757248.tar.bz2
samba-527e824293ee934ca5da0ef5424efe5ab7757248.zip
strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
Diffstat (limited to 'source3/printing/pcap.c')
-rw-r--r--source3/printing/pcap.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/printing/pcap.c b/source3/printing/pcap.c
index 1f909d3533..313e17fb1c 100644
--- a/source3/printing/pcap.c
+++ b/source3/printing/pcap.c
@@ -122,7 +122,7 @@ static void ScanQconfig_fn(char *psz,void (*fn)(char *, char *))
{
case 0: /* locate an entry */
if (*line == '\t' || *line == ' ') continue;
- if ((p=strchr(line,':')))
+ if ((p=strchr_m(line,':')))
{
*p = '\0';
p = strtok(line,":");
@@ -297,14 +297,14 @@ BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname)
continue;
/* now we have a real printer line - cut it off at the first : */
- p = strchr(line,':');
+ p = strchr_m(line,':');
if (p) *p = 0;
/* now just check if the name is in the list */
/* NOTE: I avoid strtok as the fn calling this one may be using it */
for (p=line; p; p=q)
{
- if ((q = strchr(p,'|'))) *q++ = 0;
+ if ((q = strchr_m(p,'|'))) *q++ = 0;
if (strequal(p,pszPrintername))
{
@@ -378,7 +378,7 @@ void pcap_printer_fn(void (*fn)(char *, char *))
continue;
/* now we have a real printer line - cut it off at the first : */
- p = strchr(line,':');
+ p = strchr_m(line,':');
if (p) *p = 0;
/* now find the most likely printer name and comment
@@ -388,9 +388,9 @@ void pcap_printer_fn(void (*fn)(char *, char *))
for (p=line; p; p=q)
{
BOOL has_punctuation;
- if ((q = strchr(p,'|'))) *q++ = 0;
+ if ((q = strchr_m(p,'|'))) *q++ = 0;
- has_punctuation = (strchr(p,' ') || strchr(p,'\t') || strchr(p,'(') || strchr(p,')'));
+ has_punctuation = (strchr_m(p,' ') || strchr_m(p,'\t') || strchr_m(p,'(') || strchr_m(p,')'));
if (strlen(p)>strlen(comment) && has_punctuation)
{
@@ -405,7 +405,7 @@ void pcap_printer_fn(void (*fn)(char *, char *))
continue;
}
- if (!strchr(comment,' ') &&
+ if (!strchr_m(comment,' ') &&
strlen(p) > strlen(comment))
{
StrnCpy(comment,p,sizeof(comment)-1);