]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Fix variable/function collision with Solaris x86 system include macros.
authorAidan Van Dyk <aidan@ifax.com>
Mon, 10 Nov 2003 18:13:50 +0000 (18:13 +0000)
committerAidan Van Dyk <aidan@ifax.com>
Mon, 10 Nov 2003 18:13:50 +0000 (18:13 +0000)
See bugzilla:
http://bugs.hylafax.org/bugzilla/show_bug.cgi?id=444

Rename temporary variable CS => CSum n pageSendApp::sendUcpMsg()
Rename HylaFAXServer::SP() => HylaFAXServer::SPACE()

faxd/pageSendApp.c++
hfaxd/HylaFAXServer.h
hfaxd/Parser.c++
hfaxd/SNPPServer.c++

index 865bf1d95419efcb5081c88c774d34b70eebb8c7..b392d3e9eb2e43f8391b0adb434f22a0df81ff08 100644 (file)
@@ -1099,7 +1099,7 @@ pageSendApp::sendUcpMsg(FaxRequest& req, faxRequest& preq, const fxStr& msg, fxS
                sum += tmp[i];
            sum&=0xff;
            pos2=tmp.length();
-           fxStr CS=tmp.tokenR(pos2,"/");
+           fxStr CSum=tmp.tokenR(pos2,"/");
 
            pos2=0;
            fxStr TRN=tmp.token(pos2,"/");
index eff749567661ff9947336e7c7e2a4166312df7df..36c9ed84d14bac029aa0cdae1c6ab85c461f841e 100644 (file)
@@ -428,7 +428,7 @@ protected:
     bool jgrp_param(fxStr& jgid);
     bool pathname(fxStr& s);
     bool CRLF();
-    bool SP();
+    bool SPACE();
     bool COMMA();
     bool TIMESPEC(u_int len, time_t& result);
     bool BOOLEAN(bool& b);
index 9b5cf528dfc0d3f1dc3ce88f78275ac7599e4555..ef55e6fcc818cae5f25a36a379122db0e6130e84 100644 (file)
@@ -405,7 +405,7 @@ HylaFAXServer::cmd(Token t)
        }
        break;
     case T_PORT:                       // port for data transfer
-       if (SP() && hostPort() && CRLF()) {
+       if (SPACE() && hostPort() && CRLF()) {
            portCmd();
            return (true);
        }
@@ -551,7 +551,7 @@ HylaFAXServer::cmd(Token t)
        }
        break;
     case T_CHMOD:                      // set file protection
-       if (SP() && STRING(s, "filename") && SP() && NUMBER(n)) {
+       if (SPACE() && STRING(s, "filename") && SPACE() && NUMBER(n)) {
            chmodCmd(s, (u_int) n);
            return (true);
        }
@@ -783,7 +783,7 @@ HylaFAXServer::cmd(Token t)
            if (checkJobState(curJob))
                jstatCmd(*curJob);
            return (true);
-       } else if (SP() && getToken(T_STRING, "parameter name")) {
+       } else if (SPACE() && getToken(T_STRING, "parameter name")) {
            tokenBody.raisecase();
            const tab* p = lookup(parmtab, N(parmtab), tokenBody);
            if (p == NULL) {
@@ -796,7 +796,7 @@ HylaFAXServer::cmd(Token t)
        }
        break;
     case T_JGPARM:                     // set/query job group parameter
-       if (SP() && getToken(T_STRING, "parameter name")) {
+       if (SPACE() && getToken(T_STRING, "parameter name")) {
            tokenBody.raisecase();
            const tab* p = lookup(parmtab, N(parmtab), tokenBody);
            if (p == NULL) {
@@ -809,7 +809,7 @@ HylaFAXServer::cmd(Token t)
        }
        break;
     case T_SITE:                       // site-specific command
-       if (SP() && getToken(T_STRING, "site command")) {
+       if (SPACE() && getToken(T_STRING, "site command")) {
            tokenBody.raisecase();
            const tab* p = lookup(sitetab, N(sitetab), tokenBody);
            if (p == NULL) {
@@ -822,7 +822,7 @@ HylaFAXServer::cmd(Token t)
        }
        break;
     case T_ANSWER:                     // answer phone on specific line
-       if (checkadmin(T_ANSWER) && SP() && STRING(s, "modem")) {
+       if (checkadmin(T_ANSWER) && SPACE() && STRING(s, "modem")) {
            fxStr how;
            if (opt_CRLF())
                how = "any";
@@ -833,7 +833,7 @@ HylaFAXServer::cmd(Token t)
        }
        break;
     case T_CHOWN:                      // assign file ownership
-       if (checkadmin(T_CHOWN) && SP() && STRING(s, "filename")) {
+       if (checkadmin(T_CHOWN) && SPACE() && STRING(s, "filename")) {
            fxStr who;
            if (string_param(who, "user")) {
                chownCmd(s, who);
@@ -842,11 +842,11 @@ HylaFAXServer::cmd(Token t)
        }
        break;
     case T_DISABLE:                    // disable outbound-usage of modem
-       if (checkadmin(T_DISABLE) && SP() && STRING(s, "modem")) {
+       if (checkadmin(T_DISABLE) && SPACE() && STRING(s, "modem")) {
            fxStr reason;
            if (opt_CRLF())
                reason = "<unspecified reason>";
-           else if (!SP() || !multi_STRING(reason))
+           else if (!SPACE() || !multi_STRING(reason))
                break;
            disableModemCmd(s, reason);
            return (true);
@@ -859,11 +859,11 @@ HylaFAXServer::cmd(Token t)
        }
        break;
     case T_SHUT:                       // shutdown server
-       if (checkadmin(T_SHUT) && SP() && STRING(s, "shutdown-time")) {
+       if (checkadmin(T_SHUT) && SPACE() && STRING(s, "shutdown-time")) {
            fxStr reason;
            if (opt_CRLF())
                reason = "<unspecified reason>";
-           else if (!SP() || !multi_STRING(reason))
+           else if (!SPACE() || !multi_STRING(reason))
                break;
            const char* cp = s;
            if (s.length() == 3 && strcasecmp(cp, "NOW") == 0) {
@@ -915,12 +915,12 @@ HylaFAXServer::site_cmd(Token t)
 
     switch (t) {
     case T_ADDUSER:
-       if (checkadmin(T_ADDUSER) && SP() && STRING(s, "user-spec")) {
+       if (checkadmin(T_ADDUSER) && SPACE() && STRING(s, "user-spec")) {
            fxStr pass;
            if (opt_CRLF()) {
                addUserCmd(s, "", "");
                return (true);
-           } else if (SP() && STRING(pass, "password")) {
+           } else if (SPACE() && STRING(pass, "password")) {
                fxStr apass;
                if (opt_CRLF()) {
                    addUserCmd(s, pass, "");
@@ -951,12 +951,12 @@ HylaFAXServer::site_cmd(Token t)
        }
        break;
     case T_CONFIG:
-       if (checkadmin(T_CONFIG) && SP() && STRING(s, "modem")) {
+       if (checkadmin(T_CONFIG) && SPACE() && STRING(s, "modem")) {
            fxStr config;
            if (opt_CRLF()) {
                configQueryCmd(s);
                return (true);
-           } else if (SP() && multi_STRING(config)) {
+           } else if (SPACE() && multi_STRING(config)) {
                configCmd(s, config);
                return (true);
            }
@@ -997,7 +997,7 @@ HylaFAXServer::param_cmd(Token t)
        if (opt_CRLF()) {
            replyJobParamValue(*curJob, 213, t);
            return (true);
-       } else if (SP() && getToken(T_STRING, "time specification")) {
+       } else if (SPACE() && getToken(T_STRING, "time specification")) {
            tokenBody.raisecase();
            if (tokenBody == "NOW") {
                if (CRLF() && setJobParameter(*curJob, t, (time_t) 0)) {
@@ -1108,7 +1108,7 @@ HylaFAXServer::param_cmd(Token t)
        if (opt_CRLF()) {
            replyJobParamValue(*curJob, 213, t);
            return (true);
-       } else if (SP() && multi_STRING(s) && CRLF() &&
+       } else if (SPACE() && multi_STRING(s) && CRLF() &&
          setJobParameter(*curJob, t, s)) {
            reply(213, "%s set to \"%s\".", parmToken(t), (const char*) s);
            return (true);
@@ -1168,12 +1168,12 @@ HylaFAXServer::param_cmd(Token t)
        if (opt_CRLF()) {
            replyJobParamValue(*curJob, 213, t);
            return (true);
-       } else if (SP() && STRING(s, "polling selector")) {
+       } else if (SPACE() && STRING(s, "polling selector")) {
            fxStr pwd;
            if (opt_CRLF()) {
                addPollOp(*curJob, s, "");      // sep but no pwd
                return (true);
-           } else if (SP() && pwd_param(pwd) && CRLF()) {
+           } else if (SPACE() && pwd_param(pwd) && CRLF()) {
                addPollOp(*curJob, s, pwd);     // sep & pwd
                return (true);
            }
@@ -1200,7 +1200,7 @@ HylaFAXServer::param_cmd(Token t)
 bool
 HylaFAXServer::string_param(fxStr& s, const char* what)
 {
-    return SP() && STRING(s, what) && CRLF();
+    return SPACE() && STRING(s, what) && CRLF();
 }
 
 /*
@@ -1209,7 +1209,7 @@ HylaFAXServer::string_param(fxStr& s, const char* what)
 bool
 HylaFAXServer::number_param(long& n)
 {
-    return SP() && NUMBER(n) && CRLF();
+    return SPACE() && NUMBER(n) && CRLF();
 }
 
 /*
@@ -1218,7 +1218,7 @@ HylaFAXServer::number_param(long& n)
 bool
 HylaFAXServer::boolean_param(bool& b)
 {
-    return SP() && BOOLEAN(b) && CRLF();
+    return SPACE() && BOOLEAN(b) && CRLF();
 }
 
 /*
@@ -1227,7 +1227,7 @@ HylaFAXServer::boolean_param(bool& b)
 bool
 HylaFAXServer::timespec_param(int ndigits, time_t& t)
 {
-    return SP() && TIMESPEC(ndigits, t) && CRLF();
+    return SPACE() && TIMESPEC(ndigits, t) && CRLF();
 }
 
 /*
@@ -1236,7 +1236,7 @@ HylaFAXServer::timespec_param(int ndigits, time_t& t)
 bool
 HylaFAXServer::pathname_param(fxStr& s)
 {
-    return SP() && pathname(s) && CRLF();
+    return SPACE() && pathname(s) && CRLF();
 }
 
 /*
@@ -1248,7 +1248,7 @@ HylaFAXServer::job_param(fxStr& jid)
     if (opt_CRLF()) {
        jid = curJob->jobid;
        return (true);
-    } else if (SP() && STRING(jid, "job identifer") && CRLF()) {
+    } else if (SPACE() && STRING(jid, "job identifer") && CRLF()) {
        jid.lowercase();
        return (true);
     }
@@ -1264,7 +1264,7 @@ HylaFAXServer::jgrp_param(fxStr& jgid)
     if (opt_CRLF()) {
        jgid = curJob->groupid;
        return (true);
-    } else if (SP() && STRING(jgid, "job group identifier") && CRLF()) {
+    } else if (SPACE() && STRING(jgid, "job group identifier") && CRLF()) {
        jgid.lowercase();
        return (true);
     }
@@ -1365,7 +1365,7 @@ HylaFAXServer::getToken(Token wanted, const char* expected)
        return (true);
 }
 
-bool HylaFAXServer::SP()               { return getToken(T_SP, "<SP>"); }
+bool HylaFAXServer::SPACE()            { return getToken(T_SP, "<SP>"); }
 bool HylaFAXServer::COMMA()            { return getToken(T_COMMA, "\",\""); }
 bool HylaFAXServer::CRLF()             { return getToken(T_CRLF, "<CRLF>"); }
 bool HylaFAXServer::opt_CRLF() { return checkToken(T_CRLF); }
index 7e48db18b513a26bc8e50f172a6a64227951f526..d1191a916c7dc49c45ff993887290499b9d1a706 100644 (file)
@@ -566,7 +566,7 @@ SNPPServer::cmd(Token t)
        }
        break;
     case T_HOLDUNTIL:                  // set time to send
-       if (SP() && SNPPTime(tv)) {
+       if (SPACE() && SNPPTime(tv)) {
            if (opt_CRLF()) {
                holdCmd(tv);
                return (true);
@@ -592,7 +592,7 @@ SNPPServer::cmd(Token t)
        }
        break;
     case T_LOGIN:                      // login as user
-       if (SP() && STRING(s, "login-ID")) {
+       if (SPACE() && STRING(s, "login-ID")) {
            fxStr pwd;
            if (opt_CRLF()) {
                logcmd(t, (const char*) s);
@@ -606,14 +606,14 @@ SNPPServer::cmd(Token t)
        }
        break;
     case T_MESSAGE:                    // specify 1-line message data
-       if (SP() && multi_STRING(s) && CRLF()) {
+       if (SPACE() && multi_STRING(s) && CRLF()) {
            logcmd(t, "%s", (const char*) s);
            messageCmd(s);
            return (true);
        }
        break;
     case T_PAGER:                      // specify destination pager ID
-       if (SP() && STRING(s, "pager-ID")) {
+       if (SPACE() && STRING(s, "pager-ID")) {
            fxStr pwd;
            if (opt_CRLF()) {
                logcmd(t, "%s", (const char*) s);
@@ -654,7 +654,7 @@ SNPPServer::cmd(Token t)
        }
        break;
     case T_SITE:                       // site-specific command
-       if (SP() && getToken(T_STRING, "site command")) {
+       if (SPACE() && getToken(T_STRING, "site command")) {
            tokenBody.raisecase();
            const tab* p = lookup(sitetab, N(sitetab), tokenBody);
            if (p == NULL) {
@@ -674,7 +674,7 @@ SNPPServer::cmd(Token t)
        }
        break;
     case T_SUBJECT:                    // message subject
-       if (SP() && multi_STRING(s) && CRLF()) {
+       if (SPACE() && multi_STRING(s) && CRLF()) {
            logcmd(t, "%s", (const char*) s);
            subjectCmd(s);
            return (true);
@@ -737,7 +737,7 @@ SNPPServer::site_cmd(Token t)
     case T_MODEM:
     case T_NOTIFY:
     case T_NOTIFYADDR:
-       if (SP() && multi_STRING(s) && CRLF() && setJobParameter(defJob, t, s)) {
+       if (SPACE() && multi_STRING(s) && CRLF() && setJobParameter(defJob, t, s)) {
            logcmd(t, "%s", (const char*) s);
            reply(250, "%s set to \"%s\".", parmToken(t), (const char*) s);
            return (true);