about summary refs log tree commit diff
path: root/editor
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2007-05-10 02:49:13 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2007-05-10 02:49:13 +0000
commit75aaab85f92320ceac421182154f91503388e86e (patch)
tree7c240aae62678f39331e7f91632a8e3ffcdd5f0a /editor
parentea150b72628d2391a1e49c42130ee35e100c1881 (diff)
downloadnetpbm-mirror-75aaab85f92320ceac421182154f91503388e86e.tar.gz
netpbm-mirror-75aaab85f92320ceac421182154f91503388e86e.tar.xz
netpbm-mirror-75aaab85f92320ceac421182154f91503388e86e.zip
Replace STREQ() with streq()
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@295 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor')
-rw-r--r--editor/pamundice.c2
-rw-r--r--editor/pgmmedian.c4
-rw-r--r--editor/ppmdraw.c30
3 files changed, 18 insertions, 18 deletions
diff --git a/editor/pamundice.c b/editor/pamundice.c
index 1fe37d3d..90bac9f6 100644
--- a/editor/pamundice.c
+++ b/editor/pamundice.c
@@ -608,7 +608,7 @@ verifyRankFileAttributes(struct pam *       const inpam,
             pm_error("Rank %u, File %u image has format 0x%x, "
                      "which differs from others (0x%x)",
                      rank, file, inpamP->format, outpamP->format);
-        else if (!STREQ(inpamP->tuple_type, outpamP->tuple_type))
+        else if (!streq(inpamP->tuple_type, outpamP->tuple_type))
             pm_error("Rank %u, File %u image has tuple type '%s', "
                      "which differs from others ('%s')",
                      rank, file, inpamP->tuple_type, outpamP->tuple_type);
diff --git a/editor/pgmmedian.c b/editor/pgmmedian.c
index 5878b1e7..9ca2bbb1 100644
--- a/editor/pgmmedian.c
+++ b/editor/pgmmedian.c
@@ -102,9 +102,9 @@ parseCommandLine(int argc, char ** argv,
         cmdlineP->cutoff = 250;
 
     if (typeSpec) {
-        if (STREQ(type, "histogram_sort"))
+        if (streq(type, "histogram_sort"))
             cmdlineP->type = HISTOGRAM_SORT_MEDIAN;
-        else if (STREQ(type, "select"))
+        else if (streq(type, "select"))
             cmdlineP->type = SELECT_MEDIAN;
         else
             pm_error("Invalid value '%s' for -type.  Valid values are "
diff --git a/editor/ppmdraw.c b/editor/ppmdraw.c
index 0dd03bc9..3bd271a6 100644
--- a/editor/ppmdraw.c
+++ b/editor/ppmdraw.c
@@ -515,7 +515,7 @@ parseDrawCommand(struct tokenSet             const commandTokens,
         if (drawCommandP == NULL)
             pm_error("Out of memory to parse '%s' command", verb);
 
-        if (STREQ(verb, "setpos")) {
+        if (streq(verb, "setpos")) {
             drawCommandP->verb = VERB_SETPOS;
             if (commandTokens.count < 3)
                 pm_error("Not enough tokens for a 'setpos' command.  "
@@ -524,22 +524,22 @@ parseDrawCommand(struct tokenSet             const commandTokens,
                 drawCommandP->u.setposArg.x = atoi(commandTokens.token[1]);
                 drawCommandP->u.setposArg.y = atoi(commandTokens.token[2]);
             }
-        } else if (STREQ(verb, "setlinetype")) {
+        } else if (streq(verb, "setlinetype")) {
             drawCommandP->verb = VERB_SETLINETYPE;
             if (commandTokens.count < 2)
                 pm_error("Not enough tokens for a 'setlinetype' command.  "
                          "Need %u.  Got %u", 2, commandTokens.count);
             else {
                 const char * const typeArg = commandTokens.token[1];
-                if (STREQ(typeArg, "normal"))
+                if (streq(typeArg, "normal"))
                     drawCommandP->u.setlinetypeArg.type = PPMD_LINETYPE_NORMAL;
-                else if (STREQ(typeArg, "normal"))
+                else if (streq(typeArg, "normal"))
                     drawCommandP->u.setlinetypeArg.type = 
                         PPMD_LINETYPE_NODIAGS;
                 else
                     pm_error("Invalid type");
             }
-        } else if (STREQ(verb, "setlineclip")) {
+        } else if (streq(verb, "setlineclip")) {
             drawCommandP->verb = VERB_SETLINECLIP;
             if (commandTokens.count < 2)
                 pm_error("Not enough tokens for a 'setlineclip' command.  "
@@ -547,7 +547,7 @@ parseDrawCommand(struct tokenSet             const commandTokens,
             else
                 drawCommandP->u.setlineclipArg.clip =
                     atoi(commandTokens.token[1]);
-        } else if (STREQ(verb, "setcolor")) {
+        } else if (streq(verb, "setcolor")) {
             drawCommandP->verb = VERB_SETCOLOR;
             if (commandTokens.count < 2)
                 pm_error("Not enough tokens for a 'setcolor' command.  "
@@ -555,7 +555,7 @@ parseDrawCommand(struct tokenSet             const commandTokens,
             else
                 drawCommandP->u.setcolorArg.colorName =
                     strdup(commandTokens.token[1]);
-        } else if (STREQ(verb, "setfont")) {
+        } else if (streq(verb, "setfont")) {
             drawCommandP->verb = VERB_SETFONT;
             if (commandTokens.count < 2)
                 pm_error("Not enough tokens for a 'setfont' command.  "
@@ -563,7 +563,7 @@ parseDrawCommand(struct tokenSet             const commandTokens,
             else
                 drawCommandP->u.setfontArg.fontFileName =
                     strdup(commandTokens.token[1]);
-        } else if (STREQ(verb, "line")) {
+        } else if (streq(verb, "line")) {
             drawCommandP->verb = VERB_LINE;
             if (commandTokens.count < 5)
                 pm_error("Not enough tokens for a 'line' command.  "
@@ -574,7 +574,7 @@ parseDrawCommand(struct tokenSet             const commandTokens,
                 drawCommandP->u.lineArg.x1 = atoi(commandTokens.token[3]);
                 drawCommandP->u.lineArg.y1 = atoi(commandTokens.token[4]);
             } 
-        } else if (STREQ(verb, "line_here")) {
+        } else if (streq(verb, "line_here")) {
             drawCommandP->verb = VERB_LINE_HERE;
             if (commandTokens.count < 3)
                 pm_error("Not enough tokens for a 'line_here' command.  "
@@ -585,7 +585,7 @@ parseDrawCommand(struct tokenSet             const commandTokens,
                 argP->right = atoi(commandTokens.token[1]);
                 argP->down = atoi(commandTokens.token[2]);
             } 
-       } else if (STREQ(verb, "spline3")) {
+       } else if (streq(verb, "spline3")) {
             drawCommandP->verb = VERB_SPLINE3;
             if (commandTokens.count < 7)
                 pm_error("Not enough tokens for a 'spline3' command.  "
@@ -600,7 +600,7 @@ parseDrawCommand(struct tokenSet             const commandTokens,
                 argP->x2 = atoi(commandTokens.token[5]);
                 argP->y2 = atoi(commandTokens.token[6]);
             } 
-        } else if (STREQ(verb, "circle")) {
+        } else if (streq(verb, "circle")) {
             drawCommandP->verb = VERB_CIRCLE;
             if (commandTokens.count < 4)
                 pm_error("Not enough tokens for a 'circle' command.  "
@@ -611,7 +611,7 @@ parseDrawCommand(struct tokenSet             const commandTokens,
                 argP->cy     = atoi(commandTokens.token[2]);
                 argP->radius = atoi(commandTokens.token[3]);
             } 
-        } else if (STREQ(verb, "filledrectangle")) {
+        } else if (streq(verb, "filledrectangle")) {
             drawCommandP->verb = VERB_FILLEDRECTANGLE;
             if (commandTokens.count < 5)
                 pm_error("Not enough tokens for a 'filledrectangle' command.  "
@@ -624,7 +624,7 @@ parseDrawCommand(struct tokenSet             const commandTokens,
                 argP->width  = atoi(commandTokens.token[3]);
                 argP->height = atoi(commandTokens.token[4]);
             } 
-        } else if (STREQ(verb, "text")) {
+        } else if (streq(verb, "text")) {
             drawCommandP->verb = VERB_TEXT;
             if (commandTokens.count < 6)
                 pm_error("Not enough tokens for a 'text' command.  "
@@ -638,7 +638,7 @@ parseDrawCommand(struct tokenSet             const commandTokens,
                 if (drawCommandP->u.textArg.text == NULL)
                     pm_error("Out of storage parsing 'text' command");
             }
-        } else if (STREQ(verb, "text_here")) {
+        } else if (streq(verb, "text_here")) {
             drawCommandP->verb = VERB_TEXT_HERE;
             if (commandTokens.count < 4)
                 pm_error("Not enough tokens for a 'text_here' command.  "
@@ -705,7 +705,7 @@ processToken(const char *      const scriptText,
     memcpy(token, &scriptText[tokenStart], tokenLength);
     token[tokenLength] = '\0';
     
-    if (STREQ(token, ";")) {
+    if (streq(token, ";")) {
         disposeOfCommandTokens(tokenSetP, scriptP);
         free(token);
     } else {