cvs-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Cvs-cvs] ccvs/src ChangeLog add.c admin.c annotate.c bas...


From: Derek Robert Price
Subject: [Cvs-cvs] ccvs/src ChangeLog add.c admin.c annotate.c bas...
Date: Wed, 12 Sep 2007 17:27:25 +0000

CVSROOT:        /cvsroot/cvs
Module name:    ccvs
Changes by:     Derek Robert Price <dprice>     07/09/12 17:27:25

Modified files:
        src            : ChangeLog add.c admin.c annotate.c base.c 
                         checkin.c checkout.c classify.c client.c 
                         commit.c create_adm.c diff.c edit.c entries.c 
                         expand_path.c filesubr.c find_names.c 
                         hardlink.c hash.c history.c ignore.c import.c 
                         lock.c log.c login.c logmsg.c ls.c main.c 
                         mkmodules.c no_diff.c parseinfo.c patch.c rcs.c 
                         rcscmds.c recurse.c root.c run.c server.c 
                         sign.c subr.c subr.h tag.c update.c verify.c 
                         vers_ts.c watch.c wrapper.c 

Log message:
        * subr.h (STREQ): New macro.
        * add.c, admin.c, annotate.c, base.c, checkin.c, checkout.c,
        classify.c, client.c, commit.c, create_adm.c, diff.c, edit.c,
        entries.c, expand_path.c, filesubr.c, find_names.c, hardlink.c,
        hash.c, history.c, ignore.c, import.c, lock.c, log.c, login.c,
        logmsg.c, ls.c, main.c, mkmodules.c, no_diff.c, parseinfo.c, patch.c,
        rcs.c, rcscmds.c, recurse.c, root.c, run.c, server.c, sign.c, subr.c,
        tag.c, update.c, verify.c, vers_ts.c, watch.c, wrapper.c: Use STREQ.
        Some cleanup.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&r1=1.3539&r2=1.3540
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/add.c?cvsroot=cvs&r1=1.132&r2=1.133
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/admin.c?cvsroot=cvs&r1=1.119&r2=1.120
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/annotate.c?cvsroot=cvs&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/base.c?cvsroot=cvs&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/checkin.c?cvsroot=cvs&r1=1.60&r2=1.61
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/checkout.c?cvsroot=cvs&r1=1.149&r2=1.150
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/classify.c?cvsroot=cvs&r1=1.40&r2=1.41
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/client.c?cvsroot=cvs&r1=1.465&r2=1.466
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/commit.c?cvsroot=cvs&r1=1.275&r2=1.276
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/create_adm.c?cvsroot=cvs&r1=1.54&r2=1.55
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/diff.c?cvsroot=cvs&r1=1.119&r2=1.120
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/edit.c?cvsroot=cvs&r1=1.100&r2=1.101
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/entries.c?cvsroot=cvs&r1=1.72&r2=1.73
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/expand_path.c?cvsroot=cvs&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/filesubr.c?cvsroot=cvs&r1=1.112&r2=1.113
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/find_names.c?cvsroot=cvs&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/hardlink.c?cvsroot=cvs&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/hash.c?cvsroot=cvs&r1=1.50&r2=1.51
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/history.c?cvsroot=cvs&r1=1.101&r2=1.102
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ignore.c?cvsroot=cvs&r1=1.60&r2=1.61
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/import.c?cvsroot=cvs&r1=1.187&r2=1.188
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/lock.c?cvsroot=cvs&r1=1.123&r2=1.124
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/log.c?cvsroot=cvs&r1=1.110&r2=1.111
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/login.c?cvsroot=cvs&r1=1.91&r2=1.92
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/logmsg.c?cvsroot=cvs&r1=1.109&r2=1.110
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ls.c?cvsroot=cvs&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/main.c?cvsroot=cvs&r1=1.274&r2=1.275
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/mkmodules.c?cvsroot=cvs&r1=1.106&r2=1.107
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/no_diff.c?cvsroot=cvs&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/parseinfo.c?cvsroot=cvs&r1=1.91&r2=1.92
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/patch.c?cvsroot=cvs&r1=1.111&r2=1.112
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/rcs.c?cvsroot=cvs&r1=1.387&r2=1.388
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/rcscmds.c?cvsroot=cvs&r1=1.74&r2=1.75
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/recurse.c?cvsroot=cvs&r1=1.122&r2=1.123
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/root.c?cvsroot=cvs&r1=1.128&r2=1.129
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/run.c?cvsroot=cvs&r1=1.63&r2=1.64
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/server.c?cvsroot=cvs&r1=1.479&r2=1.480
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/sign.c?cvsroot=cvs&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/subr.c?cvsroot=cvs&r1=1.160&r2=1.161
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/subr.h?cvsroot=cvs&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/tag.c?cvsroot=cvs&r1=1.151&r2=1.152
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/update.c?cvsroot=cvs&r1=1.274&r2=1.275
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/verify.c?cvsroot=cvs&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/vers_ts.c?cvsroot=cvs&r1=1.70&r2=1.71
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/watch.c?cvsroot=cvs&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/wrapper.c?cvsroot=cvs&r1=1.49&r2=1.50

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.3539
retrieving revision 1.3540
diff -u -b -r1.3539 -r1.3540
--- ChangeLog   12 Sep 2007 15:16:53 -0000      1.3539
+++ ChangeLog   12 Sep 2007 17:27:21 -0000      1.3540
@@ -1,5 +1,15 @@
 2007-09-12  Derek Price  <address@hidden>
 
+       * subr.h (STREQ): New macro.
+       * add.c, admin.c, annotate.c, base.c, checkin.c, checkout.c,
+       classify.c, client.c, commit.c, create_adm.c, diff.c, edit.c,
+       entries.c, expand_path.c, filesubr.c, find_names.c, hardlink.c,
+       hash.c, history.c, ignore.c, import.c, lock.c, log.c, login.c,
+       logmsg.c, ls.c, main.c, mkmodules.c, no_diff.c, parseinfo.c, patch.c,
+       rcs.c, rcscmds.c, recurse.c, root.c, run.c, server.c, sign.c, subr.c,
+       tag.c, update.c, verify.c, vers_ts.c, watch.c, wrapper.c: Use STREQ.
+       Some cleanup.
+
        * edit.c: Alphabetize includes.
        * entries.c, find_names.c, update.c: Gratuitous cleanup.
        * sanity.sh (errmsg2-16): Fix bug from previous commit.

Index: add.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/add.c,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -b -r1.132 -r1.133
--- add.c       12 Sep 2007 02:45:21 -0000      1.132
+++ add.c       12 Sep 2007 17:27:21 -0000      1.133
@@ -131,8 +131,8 @@
           don't seem to object to the warnings.
           Whatever.  */
        strip_trailing_slashes (argv[i]);
-       if (strcmp (argv[i], ".") == 0
-           || strcmp (argv[i], "..") == 0
+       if (STREQ (argv[i], ".")
+           || STREQ (argv[i], "..")
            || fncmp (last_component (argv[i]), CVSADM) == 0)
        {
            if (!quiet)
@@ -262,8 +262,8 @@
                                CVSROOTADM,
                                sizeof CVSROOTADM - 1) == 0
                    && ISSLASH (repository[cvsroot_len + sizeof CVSROOTADM])
-                   && strcmp (repository + cvsroot_len + sizeof CVSROOTADM + 1,
-                              CVSNULLREPOS) == 0)
+                   && STREQ (repository + cvsroot_len + sizeof CVSROOTADM + 1,
+                              CVSNULLREPOS))
                    error (1, 0, "cannot add to `%s'", repository);
 
                /* before we do anything else, see if we have any
@@ -363,8 +363,8 @@
                        CVSROOTADM,
                        sizeof CVSROOTADM - 1) == 0
            && ISSLASH (repository[cvsroot_len + sizeof CVSROOTADM])
-           && strcmp (repository + cvsroot_len + sizeof CVSROOTADM + 1,
-                      CVSNULLREPOS) == 0)
+           && STREQ (repository + cvsroot_len + sizeof CVSROOTADM + 1,
+                     CVSNULLREPOS))
            error (1, 0, "cannot add to `%s'", repository);
 
        entries = Entries_Open (0, finfo.update_dir);

Index: admin.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/admin.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -b -r1.119 -r1.120
--- admin.c     12 Sep 2007 13:07:33 -0000      1.119
+++ admin.c     12 Sep 2007 17:27:21 -0000      1.120
@@ -810,7 +810,7 @@
     vers = Version_TS (finfo, NULL, NULL, NULL, 0, 0);
 
     version = vers->vn_user;
-    if (version != NULL && strcmp (version, "0") == 0)
+    if (version != NULL && STREQ (version, "0"))
     {
        error (0, 0, "cannot admin newly added file `%s'", finfo->file);
        status = 1;
@@ -942,7 +942,7 @@
     {
        char *kflag = admin_data->kflag + 2;
        char *oldexpand = RCS_getexpand (rcs);
-       if (oldexpand == NULL || strcmp (oldexpand, kflag) != 0)
+       if (!oldexpand || !STREQ (oldexpand, kflag))
            RCS_setexpand (rcs, kflag);
     }
 

Index: annotate.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/annotate.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- annotate.c  24 Apr 2006 18:50:25 -0000      1.22
+++ annotate.c  12 Sep 2007 17:27:21 -0000      1.23
@@ -70,7 +70,7 @@
     char *widthstr = NULL;
     int c;
 
-    is_rannotate = (strcmp(cvs_cmd_name, "rannotate") == 0);
+    is_rannotate = STREQ (cvs_cmd_name, "rannotate");
 
     if (argc == -1)
        usage (annotate_usage);

Index: base.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/base.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- base.c      27 Aug 2007 02:11:04 -0000      1.7
+++ base.c      12 Sep 2007 17:27:21 -0000      1.8
@@ -276,7 +276,7 @@
     /* FIXME: Verify the signature in local mode.  */
 
 #ifdef SERVER_SUPPORT
-    if (server_active && strcmp (cvs_cmd_name, "export"))
+    if (server_active && !STREQ (cvs_cmd_name, "export"))
        server_base_checkout (rcs, finfo, prev, rev, ptag, tag,
                              poptions, options);
 #endif
@@ -312,7 +312,7 @@
     }
     noexec = save_noexec;
 
-    assert (strcmp (cvs_cmd_name, "export"));
+    assert (!STREQ (cvs_cmd_name, "export"));
 
 #ifdef SERVER_SUPPORT
     if (server_active)
@@ -442,7 +442,7 @@
        xchmod (finfo->file, true);
 
 #ifdef SERVER_SUPPORT
-    if (server_active && strcmp (cvs_cmd_name, "export"))
+    if (server_active && !STREQ (cvs_cmd_name, "export"))
        server_base_copy (finfo, rev ? rev : "", flags);
 #endif
 
@@ -551,7 +551,7 @@
            cvs_output (" and ", 5);
            cvs_output (rev2, 0);
            cvs_output (" into `", 7);
-           if (!finfo->update_dir || !strcmp (finfo->update_dir, "."))
+           if (!finfo->update_dir || STREQ (finfo->update_dir, "."))
                cvs_output (finfo->file, 0);
            else
                cvs_output (finfo->fullname, 0);

Index: checkin.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/checkin.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -b -r1.60 -r1.61
--- checkin.c   25 Aug 2007 03:17:57 -0000      1.60
+++ checkin.c   12 Sep 2007 17:27:21 -0000      1.61
@@ -77,8 +77,7 @@
               changes is if the file contains RCS keywords.  So we if
               we are not expanding RCS keywords, we are done.  */
 
-           if (options != NULL
-               && strcmp (options, "-V4") == 0) /* upgrade to V5 now */
+           if (options && STREQ (options, "-V4")) /* upgrade to V5 now */
                options[0] = '\0';
 
            /* FIXME: If PreservePermissions is on, RCS_cmp_file is
@@ -92,7 +91,7 @@
                 !config->preserve_perms
 #endif /* PRESERVE_PERMISSIONS_SUPPORT */
                 && options
-                && (!strcmp (options, "-ko") || !strcmp (options, "-kb")))
+                && (STREQ (options, "-ko") || STREQ (options, "-kb")))
                || !RCS_cmp_file (finfo->rcs, pvers->tag, rev, NULL, NULL,
                                  options, finfo->file))
                /* The existing file is correct.  We don't have to do
@@ -141,7 +140,7 @@
                xchmod (finfo->file, 0);
 
            /* Re-register with the new data.  */
-           if (strcmp (vers->options, "-V4") == 0)
+           if (STREQ (vers->options, "-V4"))
                vers->options[0] = '\0';
            Register (finfo->entries, finfo->file, vers->vn_rcs, vers->ts_user,
                      vers->options, vers->tag, vers->date, NULL);

Index: checkout.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/checkout.c,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -b -r1.149 -r1.150
--- checkout.c  25 Aug 2007 03:17:57 -0000      1.149
+++ checkout.c  12 Sep 2007 17:27:21 -0000      1.150
@@ -147,7 +147,7 @@
      * options to be default (like -kv) and takes care to remove the CVS
      * directory when it has done its duty
      */
-    if (strcmp (cvs_cmd_name, "export") == 0)
+    if (STREQ (cvs_cmd_name, "export"))
     {
         m_type = EXPORT;
        valid_options = "+Nnk:d:flRQqr:D:";
@@ -900,7 +900,7 @@
                 bar   -> Emptydir   (generated dir -- not in repos)
                 baz   -> quux       (finally!) */
 
-           if (strcmp (reposcopy, current_parsed_root->directory) == 0)
+           if (STREQ (reposcopy, current_parsed_root->directory))
            {
                /* We can't walk up past CVSROOT.  Instead, the
                    repository should be Emptydir. */
@@ -922,7 +922,7 @@
                           
                *rp = '\0';
                    
-               if (strcmp (reposcopy, current_parsed_root->directory) == 0)
+               if (STREQ (reposcopy, current_parsed_root->directory))
                {
                    /* Special case -- the repository name needs
                       to be "/path/to/repos/." (the trailing dot

Index: classify.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/classify.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- classify.c  28 Aug 2006 20:00:37 -0000      1.40
+++ classify.c  12 Sep 2007 17:27:21 -0000      1.41
@@ -35,7 +35,7 @@
     bool retval;
 
     if (/* Options are different...  */
-       strcmp (vers->entdata->options, vers->options)
+       !STREQ (vers->entdata->options, vers->options)
        /* ...or...  */
        || (/* ...clearing stickies...  */
            aflag
@@ -46,15 +46,15 @@
                 * changed by -A...
                 */
                || (strlen (vers->entdata->options)
-                   && strcmp (vers->entdata->options, "-kkv")
-                   && strcmp (vers->entdata->options, "-kb"))))
+                   && !STREQ (vers->entdata->options, "-kkv")
+                   && !STREQ (vers->entdata->options, "-kb"))))
        /* ...or...  */
        || (/* ...this is not commit...  */
-           strcmp (cvs_cmd_name, "commit")
+           !STREQ (cvs_cmd_name, "commit")
            /* ...and...  */
            && (/* ...the tag is changing in a way that affects Name keys...  */
                (vers->entdata->tag && vers->tag
-                && strcmp (vers->entdata->tag, vers->tag)
+                && !STREQ (vers->entdata->tag, vers->tag)
                 && !(isdigit (vers->entdata->tag[0])
                      && isdigit (vers->entdata->tag[0])))
                || (!vers->entdata->tag && vers->tag
@@ -161,7 +161,7 @@
            /* no user file or no difference, just checkout */
            ret = T_CHECKOUT;
     }
-    else if (strcmp (vers->vn_user, "0") == 0)
+    else if (STREQ (vers->vn_user, "0"))
     {
        /* An entry for a new-born file; ts_rcs is dummy */
 
@@ -240,7 +240,7 @@
                 */
                ret = T_REMOVE_ENTRY;
            }
-           else if (strcmp (vers->vn_rcs, vers->vn_user + 1) == 0)
+           else if (STREQ (vers->vn_rcs, vers->vn_user + 1))
                /*
                 * The RCS file is the same version as the user file was, and
                 * that's OK; remove it
@@ -291,7 +291,7 @@
                           finfo->fullname);
                ret = T_REMOVE_ENTRY;
            }
-           else if (strcmp (vers->ts_user, vers->ts_rcs)
+           else if (!STREQ (vers->ts_user, vers->ts_rcs)
                     && No_Difference (finfo, vers))
            {
                /* they are different -> conflict */
@@ -315,7 +315,7 @@
                ret = T_REMOVE_ENTRY;
            }
        }
-       else if (strcmp (vers->vn_rcs, vers->vn_user) == 0)
+       else if (STREQ (vers->vn_rcs, vers->vn_user))
        {
            /* The RCS file is the same version as the user file */
 
@@ -334,14 +334,14 @@
                   gets hit when a patch fails and the client fetches
                   a file.  I'm not sure there is currently any way
                   for the server to distinguish those two cases.  */
-               if (strcmp (cvs_cmd_name, "update") == 0)
+               if (STREQ (cvs_cmd_name, "update"))
                    if (!really_quiet)
                        error (0, 0, "warning: `%s' was lost", finfo->fullname);
                ret = T_CHECKOUT;
            }
-           else if (!strcmp (vers->ts_user,
-                             vers->ts_conflict
-                             ? vers->ts_conflict : vers->ts_rcs))
+           else if (STREQ (vers->ts_user,
+                           vers->ts_conflict ? vers->ts_conflict
+                                             : vers->ts_rcs))
            {
 
                /*
@@ -370,8 +370,9 @@
                 * changing any sticky -k options, else needs merge
                 */
 #ifdef XXX_FIXME_WHEN_RCSMERGE_IS_FIXED
-               if (strcmp (vers->entdata->options ?
-                      vers->entdata->options : "", vers->options) == 0)
+               if (STREQ (vers->entdata->options ? vers->entdata->options
+                                                 : "",
+                          vers->options))
                    ret = T_MODIFIED;
                else
                    ret = T_NEEDS_MERGE;
@@ -387,14 +388,12 @@
                sticky_ck (finfo, aflag, vers);
 #endif
            }
-           else if (strcmp (vers->entdata->options ?
-                      vers->entdata->options : "", vers->options) != 0)
-           {
+           else if (!STREQ (vers->entdata->options ? vers->entdata->options
+                                                   : "",
+                            vers->options))
                /* file has not changed; check out if -k changed */
                ret = T_CHECKOUT;
-           }
            else
-           {
 
                /*
                 * else -> note that No_Difference will Register the
@@ -403,7 +402,6 @@
                 */
                ret = T_UPTODATE;
            }
-       }
        else
        {
            /* The RCS file is a newer version than the user file */
@@ -414,12 +412,12 @@
 
                /* See comment at other "update" compare, for more
                   thoughts on this comparison.  */
-               if (strcmp (cvs_cmd_name, "update") == 0)
+               if (STREQ (cvs_cmd_name, "update"))
                    if (!really_quiet)
                        error (0, 0, "warning: `%s' was lost", finfo->fullname);
                ret = T_CHECKOUT;
            }
-           else if (strcmp (vers->ts_user, vers->ts_rcs) == 0)
+           else if (STREQ (vers->ts_user, vers->ts_rcs))
 
                /*
                 * The user file is still unmodified, so just get it as well
@@ -451,9 +449,9 @@
        char *enttag = vers->entdata->tag;
        char *entdate = vers->entdata->date;
 
-       if ((enttag && vers->tag && strcmp (enttag, vers->tag)) ||
+       if ((enttag && vers->tag && !STREQ (enttag, vers->tag)) ||
            ((enttag && !vers->tag) || (!enttag && vers->tag)) ||
-           (entdate && vers->date && strcmp (entdate, vers->date)) ||
+           (entdate && vers->date && !STREQ (entdate, vers->date)) ||
            ((entdate && !vers->date) || (!entdate && vers->date)))
        {
            Register (finfo->entries, finfo->file, vers->vn_user, vers->ts_rcs,
@@ -465,10 +463,11 @@
                /* We need to update the entries line on the client side.
                   It is possible we will later update it again via
                   server_updated or some such, but that is OK.  */
-               server_update_entries
-                 (finfo->file, finfo->update_dir, finfo->repository,
-                  strcmp (vers->ts_rcs, vers->ts_user) == 0 ?
-                  SERVER_UPDATED : SERVER_MERGED);
+               server_update_entries (finfo->file, finfo->update_dir,
+                                      finfo->repository,
+                                      STREQ (vers->ts_rcs,
+                                             vers->ts_user) ? SERVER_UPDATED
+                                                            : SERVER_MERGED);
            }
 #endif
        }

Index: client.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/client.c,v
retrieving revision 1.465
retrieving revision 1.466
diff -u -b -r1.465 -r1.466
--- client.c    12 Sep 2007 02:45:22 -0000      1.465
+++ client.c    12 Sep 2007 17:27:21 -0000      1.466
@@ -164,7 +164,7 @@
     if (list_isempty (dirs_sent_to_server))
        return 0;               /* always send it */
 
-    if (!strcmp (arg, "."))
+    if (STREQ (arg, "."))
        return 0;               /* always send it */
 
     /* We should send arg if it is one of the directories sent to the
@@ -233,7 +233,7 @@
 
        /* Now check the value for root. */
        if (root_string && current_parsed_root
-           && strcmp (root_string, original_parsed_root->original))
+           && !STREQ (root_string, original_parsed_root->original))
        {
            /* Don't send this, since the CVSROOTs don't match. */
            return 1;
@@ -548,7 +548,7 @@
            *q++ = '\0';
        for (rq = requests; rq->name; ++rq)
        {
-           if (!strcmp (rq->name, p))
+           if (STREQ (rq->name, p))
                break;
        }
        if (!rq->name)
@@ -812,7 +812,7 @@
 
     short_pathname = xmalloc (strlen (pathname) + strlen (filename) + 5);
     /* Leave off the path when it is the CWD.  */
-    if (strcmp (pathname, "./"))
+    if (!STREQ (pathname, "./"))
        strcpy (short_pathname, pathname);
     else
        short_pathname[0] = '\0';
@@ -956,7 +956,7 @@
            {
                /* It already existed, fine.  Just keep going.  */
            }
-           else if (!strcmp (cvs_cmd_name, "export"))
+           else if (STREQ (cvs_cmd_name, "export"))
                /* Don't create CVSADM directories if this is export.  */
                ;
            else
@@ -1023,7 +1023,7 @@
        if (CVS_CHDIR (dir_name) < 0)
            error (1, errno, "could not chdir to %s", dir_name);
     }
-    else if (!strcmp (cvs_cmd_name, "export"))
+    else if (STREQ (cvs_cmd_name, "export"))
        /* Don't create CVSADM directories if this is export.  */
        ;
     else if (!isdir (CVSADM))
@@ -1046,9 +1046,9 @@
            free (repo);
     }
 
-    if (strcmp (cvs_cmd_name, "export"))
+    if (!STREQ (cvs_cmd_name, "export"))
     {
-       last_entries = Entries_Open (0, strcmp (pathname, "./")
+       last_entries = Entries_Open (0, !STREQ (pathname, "./")
                                        ? pathname : "");
 
        /* If this is a newly created directory, we will record
@@ -1068,7 +1068,7 @@
            List *dirlist;
 
            dirlist = Find_Directories (NULL,
-                                       strcmp (pathname, "./")
+                                       !STREQ (pathname, "./")
                                        ? pathname : "",
                                        W_LOCAL, last_entries);
            dellist (&dirlist);
@@ -1077,7 +1077,7 @@
     free (reposdirname);
     (*func) (data, last_entries, short_pathname, filename);
     if (last_entries)
-       Entries_Close (last_entries, strcmp (pathname, "./") ? pathname : "");
+       Entries_Close (last_entries, !STREQ (pathname, "./") ? pathname : "");
     free (dir_name);
     free (short_pathname);
     free (reposname);
@@ -1578,7 +1578,7 @@
        char *buf;
        bool patch_failed;
 
-       if (get_verify_checkouts (true) && strcmp (cvs_cmd_name, "export"))
+       if (get_verify_checkouts (true) && !STREQ (cvs_cmd_name, "export"))
            error (get_verify_checkouts_fatal (), 0,
                   "No signature for `%s'.", short_pathname);
 
@@ -1619,7 +1619,7 @@
            flag, then we don't want to convert, else we do (because
            CVS assumes text files by default). */
        if (options)
-           bin = !strcmp (options, "-kb");
+           bin = STREQ (options, "-kb");
        else
            bin = false;
 
@@ -1846,17 +1846,17 @@
            /* After a join, control can get here without having changed the
             * version number.  In this case, do not remove the base file.
             */
-           if (strcmp (vn, e->version))
+           if (!STREQ (vn, e->version))
                base_remove (filename, e->version);
        }
 
        if (last_merge)
        {
            /* Won't need these now that the merge is complete.  */
-           if (strcmp (vn, base_merge_rev1))
+           if (!STREQ (vn, base_merge_rev1))
                base_remove (filename, base_merge_rev1);
            free (base_merge_rev1);
-           if (strcmp (vn, base_merge_rev2))
+           if (!STREQ (vn, base_merge_rev2))
                base_remove (filename, base_merge_rev2);
            free (base_merge_rev2);
        }
@@ -1892,7 +1892,7 @@
     else if (data->contents == UPDATE_ENTRIES_CHECKIN
             && !noexec
             /* This isn't add or remove.  */
-            && strcmp (vn, "0") && *vn != '-')
+            && !STREQ (vn, "0") && *vn != '-')
     {
        /* On checkin, create the base file.  */
        Node *n;
@@ -1905,7 +1905,7 @@
             * changing the revision number or the base file.
             */
            Entnode *e = n->data;
-           if (strcmp (vn, e->version))
+           if (!STREQ (vn, e->version))
                /* The version number has changed.  */
                base_remove (filename, e->version);
            else
@@ -1987,7 +1987,7 @@
      * Process the entries line.  Do this after we've written the file,
      * since we need the timestamp.
      */
-    if (strcmp (cvs_cmd_name, "export"))
+    if (!STREQ (cvs_cmd_name, "export"))
     {
        char *local_timestamp;
        char *file_timestamp;
@@ -2006,7 +2006,7 @@
         * date.  Create a dummy timestamp which will never compare
         * equal to the timestamp of the file.
         */
-       if (vn[0] == '\0' || !strcmp (vn, "0") || vn[0] == '-')
+       if (vn[0] == '\0' || STREQ (vn, "0") || vn[0] == '-')
            local_timestamp = "dummy timestamp";
        else if (!local_timestamp)
        {
@@ -2020,7 +2020,7 @@
               vis-a-vis both Entries and Base and clarify
               cvsclient.texi accordingly.  */
 
-           if (!strcmp (cvs_cmd_name, "commit"))
+           if (STREQ (cvs_cmd_name, "commit"))
            {
                char *update_dir = dir_name (short_pathname);
                mark_up_to_date (update_dir, filename);
@@ -2039,7 +2039,7 @@
                assert (n);
 
                e = n->data;
-               if (strcmp (vn, e->version))
+               if (!STREQ (vn, e->version))
                    /* Merge.  */
                    ignore_merge = false;
                else
@@ -2330,10 +2330,10 @@
      */
     buf = read_file_from_server (fullbase, &mode_string, &size);
 
-    if (options) bin = !strcmp (options, "-kb");
+    if (options) bin = STREQ (options, "-kb");
     else bin = false;
 
-    if (*prev && strcmp (prev, rev))
+    if (*prev && !STREQ (prev, rev))
     {
        char *filebuf;
        size_t filebufsize;
@@ -2847,7 +2847,7 @@
        label2 = NULL;
     }
 
-    if (!strcmp (ft1, "TEMP"))
+    if (STREQ (ft1, "TEMP"))
     {
        if (!temp_checkout1)
            error (1, 0,
@@ -2856,12 +2856,12 @@
 
        used_t1 = true;
     }
-    else if (!strcmp (ft1, "DEVNULL"))
+    else if (STREQ (ft1, "DEVNULL"))
        f1 = DEVNULL;
     else
        error (1, 0, "Server sent unrecognized diff file type (`%s')", ft1);
 
-    if (!strcmp (ft2, "TEMP"))
+    if (STREQ (ft2, "TEMP"))
     {
        if ((used_t1 && !temp_checkout2) || (!used_t1 && !temp_checkout1))
            error (1, 0,
@@ -2878,9 +2878,9 @@
            used_t1 = true;
        }
     }
-    else if (!strcmp (ft2, "DEVNULL"))
+    else if (STREQ (ft2, "DEVNULL"))
        f2 = DEVNULL;
-    else if (!strcmp (ft2, "WORKFILE"))
+    else if (STREQ (ft2, "WORKFILE"))
        f2 = filename;
     else
        error (1, 0, "Server sent unrecognized diff file type (`%s')", ft2);
@@ -2979,7 +2979,7 @@
 static int
 is_cvsroot_level (char *pathname)
 {
-    if (strcmp (toplevel_repos, current_parsed_root->directory))
+    if (!STREQ (toplevel_repos, current_parsed_root->directory))
        return 0;
 
     return !strchr (pathname, '/');
@@ -3002,7 +3002,7 @@
 static void
 handle_set_static_directory (char *args, size_t len)
 {
-    if (!strcmp (cvs_cmd_name, "export"))
+    if (STREQ (cvs_cmd_name, "export"))
     {
        /* Swallow the repository.  */
        read_line (NULL);
@@ -3026,7 +3026,7 @@
 static void
 handle_clear_static_directory (char *pathname, size_t len)
 {
-    if (!strcmp (cvs_cmd_name, "export"))
+    if (STREQ (cvs_cmd_name, "export"))
     {
        /* Swallow the repository.  */
        read_line (NULL);
@@ -3080,7 +3080,7 @@
 static void
 handle_set_sticky (char *pathname, size_t len)
 {
-    if (!strcmp (cvs_cmd_name, "export"))
+    if (STREQ (cvs_cmd_name, "export"))
     {
        /* Swallow the repository.  */
        read_line (NULL);
@@ -3120,7 +3120,7 @@
 static void
 handle_clear_sticky (char *pathname, size_t len)
 {
-    if (!strcmp (cvs_cmd_name, "export"))
+    if (STREQ (cvs_cmd_name, "export"))
     {
        /* Swallow the repository.  */
        read_line (NULL);
@@ -3201,7 +3201,7 @@
     struct save_dir *p;
 
     if ((dir[0] == '.' && dir[1] == '\0')
-       || (prune_candidates && !strcmp (dir, prune_candidates->dir)))
+       || (prune_candidates && STREQ (dir, prune_candidates->dir)))
        return;
     p = xmalloc (sizeof (struct save_dir));
     p->dir = xstrdup (dir);
@@ -3281,8 +3281,8 @@
     if (!update_dir || update_dir[0] == '\0')
        update_dir = ".";
 
-    if (last_repos && !strcmp (repos, last_repos)
-       && last_update_dir && !strcmp (update_dir, last_update_dir))
+    if (last_repos && STREQ (repos, last_repos)
+       && last_update_dir && STREQ (update_dir, last_update_dir))
        /* We've already sent it.  */
        return;
 
@@ -3291,7 +3291,7 @@
 
     /* Add a directory name to the list of those sent to the
        server. */
-    if (update_dir && *update_dir != '\0' && strcmp (update_dir, ".")
+    if (update_dir && *update_dir != '\0' && !STREQ (update_dir, ".")
        && !findnode (dirs_sent_to_server, update_dir))
     {
        Node *n;
@@ -3340,7 +3340,7 @@
        send_to_server (repos, 0);
     send_to_server ("\012", 1);
 
-    if (strcmp (cvs_cmd_name, "import")
+    if (!STREQ (cvs_cmd_name, "import")
        && supported_request ("Static-directory"))
     {
        adm_name[0] = '\0';
@@ -3355,7 +3355,7 @@
            send_to_server ("Static-directory\012", 0);
        }
     }
-    if (strcmp (cvs_cmd_name, "import")
+    if (!STREQ (cvs_cmd_name, "import")
        && supported_request ("Sticky"))
     {
        FILE *f;
@@ -3467,7 +3467,7 @@
                    current_parsed_root->directory, set toplevel_repos to
                    current_parsed_root->directory. */
                if (repository_len > update_dir_len
-                   && !strcmp (repository + repository_len - update_dir_len,
+                   && STREQ (repository + repository_len - update_dir_len,
                                update_dir)
                    /* TOPLEVEL_REPOS shouldn't be above 
current_parsed_root->directory */
                    && ((size_t)(repository_len - update_dir_len)
@@ -3526,7 +3526,7 @@
        goto error_exit;
     }
     *cp = '\0';
-    if (strcmp (filename, line + 1))
+    if (!STREQ (filename, line + 1))
        error (0, 0, "protocol error: notified %s, expected %s", filename,
               line + 1);
 
@@ -3838,15 +3838,15 @@
     switch (tag[0])
     {
        case '+':
-           if (!strcmp (tag, "+updated"))
+           if (STREQ (tag, "+updated"))
                updated_seen = 1;
-           else if (!strcmp (tag, "+importmergecmd"))
+           else if (STREQ (tag, "+importmergecmd"))
                importmergecmd.seen = 1;
            break;
        case '-':
-           if (!strcmp (tag, "-updated"))
+           if (STREQ (tag, "-updated"))
                updated_seen = 0;
-           else if (!strcmp (tag, "-importmergecmd"))
+           else if (STREQ (tag, "-importmergecmd"))
            {
                char buf[80];
 
@@ -3902,7 +3902,7 @@
        default:
            if (updated_seen)
            {
-               if (!strcmp (tag, "fname"))
+               if (STREQ (tag, "fname"))
                {
                    if (updated_fname)
                    {
@@ -3922,27 +3922,27 @@
            }
            else if (importmergecmd.seen)
            {
-               if (!strcmp (tag, "conflicts"))
+               if (STREQ (tag, "conflicts"))
                {
-                   if (text == NULL || !strcmp (text, "No"))
+                   if (text == NULL || STREQ (text, "No"))
                        importmergecmd.conflicts = -1;
                    else
                        importmergecmd.conflicts = atoi (text);
                }
-               else if (!strcmp (tag, "mergetag1"))
+               else if (STREQ (tag, "mergetag1"))
                    importmergecmd.mergetag1 = xstrdup (text);
-               else if (!strcmp (tag, "mergetag2"))
+               else if (STREQ (tag, "mergetag2"))
                    importmergecmd.mergetag2 = xstrdup (text);
-               else if (!strcmp (tag, "repository"))
+               else if (STREQ (tag, "repository"))
                    importmergecmd.repository = xstrdup (text);
                /* Swallow all other tags.  Either they are text for
                    which we are going to print our own version when we
                    see -importmergecmd, or they are future extensions
                    we can safely ignore.  */
            }
-           else if (!strcmp (tag, "newline"))
+           else if (STREQ (tag, "newline"))
                printf ("\n");
-           else if (!strcmp (tag, "date"))
+           else if (STREQ (tag, "date"))
            {
                if (text)
                {
@@ -4296,7 +4296,7 @@
     struct request *rq;
 
     for (rq = requests; rq->name; rq++)
-       if (!strcmp (rq->name, name))
+       if (STREQ (rq->name, name))
            return (rq->flags & RQ_SUPPORTED) != 0;
     error (1, 0, "internal error: testing support for unknown request?");
     /* NOTREACHED */
@@ -4673,7 +4673,7 @@
        {
            read_line_via (from_server, to_server, &read_buf);
 
-           if (!strcmp (read_buf, "I HATE YOU"))
+           if (STREQ (read_buf, "I HATE YOU"))
            {
                /* Authorization not granted.
                 *
@@ -4727,7 +4727,7 @@
                fprintf (stderr, "%s\n", p);
                exit (EXIT_FAILURE);
            }
-           else if (!strcmp (read_buf, "I LOVE YOU"))
+           else if (STREQ (read_buf, "I LOVE YOU"))
            {
                free (read_buf);
                break;
@@ -4960,7 +4960,7 @@
            stored_mode = NULL;
        }
 
-       rootless = !strcmp (cvs_cmd_name, "init");
+       rootless = STREQ (cvs_cmd_name, "init");
        if (!rootless)
        {
            send_to_server ("Root ", 0);
@@ -4976,13 +4976,13 @@
 
            for (rs = responses; rs->name; ++rs)
            {
-               if (suppress_redirect && !strcmp (rs->name, "Redirect"))
+               if (suppress_redirect && STREQ (rs->name, "Redirect"))
                    continue;
                if (suppress_bases && !strncmp (rs->name, "Base-", 5))
                    continue;
-               if (suppress_bases && !strcmp (rs->name, "OpenPGP-signature"))
+               if (suppress_bases && STREQ (rs->name, "OpenPGP-signature"))
                    continue;
-               if (suppress_bases && !strcmp (rs->name, "Temp-checkout"))
+               if (suppress_bases && STREQ (rs->name, "Temp-checkout"))
                    continue;
 
                send_to_server (" ", 0);
@@ -5183,7 +5183,7 @@
        reason to bother would be so we could make add work without
        contacting the server, I suspect).  */
 
-    if (!strcmp (cvs_cmd_name, "import") || !strcmp (cvs_cmd_name, "add"))
+    if (STREQ (cvs_cmd_name, "import") || STREQ (cvs_cmd_name, "add"))
     {
        if (supported_request ("wrapper-sendme-rcsOptions"))
        {
@@ -5285,7 +5285,7 @@
        If so, make sure to open it in binary mode: */
 
     if (vers && vers->options)
-      bin = !strcmp (vers->options, "-kb");
+      bin = STREQ (vers->options, "-kb");
     else
       bin = 0;
 
@@ -5474,7 +5474,7 @@
        send_to_server ("/", 0);
        if (vers->ts_conflict)
        {
-           if (vers->ts_user && !strcmp (vers->ts_conflict, vers->ts_user))
+           if (vers->ts_user && STREQ (vers->ts_conflict, vers->ts_user))
                send_to_server ("+=", 0);
            else
                send_to_server ("+modified", 0);
@@ -5541,10 +5541,9 @@
     }
     else if (!vers->ts_rcs || args->force)
        may_be_modified = true;
-    else if (strcmp (vers->ts_conflict
-                    && supported_request ("Empty-conflicts")
+    else if (!STREQ (vers->ts_conflict && supported_request ("Empty-conflicts")
                     ? vers->ts_conflict : vers->ts_rcs, vers->ts_user)
-            || (vers->ts_conflict && !strcmp (cvs_cmd_name, "diff")))
+            || (vers->ts_conflict && STREQ (cvs_cmd_name, "diff")))
     {
        char *basefn = make_base_file_name (filename, vers->ts_user);
        if (!isfile (basefn) || xcmp (filename, basefn))
@@ -5563,7 +5562,7 @@
        if (may_be_modified)
        {
            if (args->force_signatures
-               || (!strcmp (cvs_cmd_name, "commit")
+               || (STREQ (cvs_cmd_name, "commit")
                    && get_sign_commits (supported_request ("Signature"))))
            {
                if (!supported_request ("Signature"))
@@ -5571,7 +5570,7 @@
 
                send_signature (Short_Repository (finfo->repository),
                                finfo->file, finfo->fullname,
-                               vers && !strcmp (vers->options, "-kb"));
+                               vers && STREQ (vers->options, "-kb"));
            }
 
            if (args->no_contents
@@ -5605,7 +5604,7 @@
 
                send_signature (Short_Repository (finfo->repository),
                                finfo->file, finfo->fullname,
-                               vers && !strcmp (vers->options, "-kb"));
+                               vers && STREQ (vers->options, "-kb"));
            }
 
            send_to_server ("Unchanged ", 0);
@@ -6071,7 +6070,7 @@
               "internal error: pathname `%s' doesn't specify file in `%s'",
               repository, toplevel_repos);
 
-    if (!strcmp (repository, toplevel_repos))
+    if (STREQ (repository, toplevel_repos))
     {
        update_dir = "";
        fullname = xstrdup (vfile);
@@ -6131,7 +6130,7 @@
            error (1, 0, "Server doesn't support commit signatures.");
 
        send_signature (Short_Repository (repository), vfile, fullname,
-                       vers.options && !strcmp (vers.options, "-kb"));
+                       vers.options && STREQ (vers.options, "-kb"));
     }
 
     send_modified (vfile, fullname, &vers);

Index: commit.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/commit.c,v
retrieving revision 1.275
retrieving revision 1.276
diff -u -b -r1.275 -r1.276
--- commit.c    12 Sep 2007 13:07:33 -0000      1.275
+++ commit.c    12 Sep 2007 17:27:22 -0000      1.276
@@ -274,7 +274,7 @@
        /* else */
        status = T_REMOVED;
     }
-    else if (strcmp (vers->vn_user, "0") == 0)
+    else if (STREQ (vers->vn_user, "0"))
     {
        if (vers->ts_user == NULL)
        {
@@ -298,8 +298,8 @@
        freevers_ts (&vers);
        return 0;
     }
-    else if (vers->ts_rcs != NULL
-            && (args->force || strcmp (vers->ts_user, vers->ts_rcs) != 0))
+    else if (vers->ts_rcs
+            && (args->force || !STREQ (vers->ts_user, vers->ts_rcs)))
        /* If we are forcing commits, pretend that the file is
            modified.  */
        status = T_MODIFIED;
@@ -852,8 +852,8 @@
                    CVSROOTADM,
                    sizeof (CVSROOTADM) - 1) == 0
        && ISSLASH (finfo->repository[cvsroot_len + sizeof (CVSROOTADM)])
-       && strcmp (finfo->repository + cvsroot_len + sizeof (CVSROOTADM) + 1,
-                  CVSNULLREPOS) == 0
+       && STREQ (finfo->repository + cvsroot_len + sizeof (CVSROOTADM) + 1,
+                 CVSNULLREPOS)
        )
        error (1, 0, "cannot check in to %s", finfo->repository);
 
@@ -1059,7 +1059,7 @@
                             break;
                         }
                         *p = '\0';
-                        if (strcmp (caller, p0) == 0)
+                        if (STREQ (caller, p0))
                         {
                             break;
                         }
@@ -1072,7 +1072,7 @@
                         p0 = p;
                     }
 
-                    if (strcmp (caller, p0) == 0)
+                    if (STREQ (caller, p0))
                     {
                         editor = caller;
                     }
@@ -1645,7 +1645,7 @@
        p = repository + strlen (current_parsed_root->directory);
        if (*p == '/')
            ++p;
-       if (strcmp ("CVSROOT", p) == 0
+       if (STREQ ("CVSROOT", p)
            /* Check for subdirectories because people may want to create
               subdirectories and list files therein in checkoutlist.  */
            || strncmp ("CVSROOT/", p, strlen ("CVSROOT/")) == 0
@@ -2154,7 +2154,7 @@
        oldexpand = RCS_getexpand (rcs);
        if ((oldexpand != NULL
             && options != NULL
-            && strcmp (options + 2, oldexpand) != 0)
+            && !STREQ (options + 2, oldexpand))
            || (oldexpand == NULL && options != NULL))
        {
            /* We tell the user about this, because it means that the

Index: create_adm.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/create_adm.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- create_adm.c        25 Aug 2007 03:17:58 -0000      1.54
+++ create_adm.c        12 Sep 2007 17:27:22 -0000      1.55
@@ -55,8 +55,8 @@
        return 0;
 
     /* A leading "./" looks bad in error messages.  */
-    ud = strcmp (dir, ".");
-    tmp = Xasprintf ("%s%s%s", ud ? dir : "", ud ? "/" : "", CVSADM);
+    ud = STREQ (dir, ".");
+    tmp = Xasprintf ("%s%s%s", ud ? "" : dir, ud ? "" : "/", CVSADM);
     if (isfile (tmp))
        error (1, 0, "there is a version in %s already", update_dir);
 
@@ -95,7 +95,7 @@
        spend the time making sure all of the code can handle it if we
        don't do it. */
 
-    if (strcmp (reposcopy, current_parsed_root->directory) == 0)
+    if (STREQ (reposcopy, current_parsed_root->directory))
     {
        reposcopy = xrealloc (reposcopy, strlen (reposcopy) + 3);
        strcat (reposcopy, "/.");

Index: diff.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/diff.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -b -r1.119 -r1.120
--- diff.c      30 May 2007 23:20:43 -0000      1.119
+++ diff.c      12 Sep 2007 17:27:22 -0000      1.120
@@ -526,7 +526,7 @@
     if (diff_rev1 || diff_date1)
     {
        /* special handling for TAG_HEAD */
-       if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0)
+       if (diff_rev1 && STREQ (diff_rev1, TAG_HEAD))
        {
            if (vers->vn_rcs != NULL && vers->srcfile != NULL)
                *use_rev1 = RCS_branch_head (vers->srcfile, vers->vn_rcs);
@@ -542,7 +542,7 @@
     if (diff_rev2 || diff_date2)
     {
        /* special handling for TAG_HEAD */
-       if (diff_rev2 && strcmp (diff_rev2, TAG_HEAD) == 0)
+       if (diff_rev2 && STREQ (diff_rev2, TAG_HEAD))
        {
            if (vers->vn_rcs && vers->srcfile)
                *use_rev2 = RCS_branch_head (vers->srcfile, vers->vn_rcs);
@@ -635,7 +635,7 @@
         * files are different when the revs are.
         */
        assert (*use_rev2);
-       if (!strcmp (*use_rev1, *use_rev2))
+       if (STREQ (*use_rev1, *use_rev2))
            return DIFF_SAME;
        /* else fall through and do the diff */
     }
@@ -704,7 +704,7 @@
      */
     if (*use_rev1 && *use_rev2) 
     {
-       if (!strcmp (*use_rev1, *use_rev2))
+       if (STREQ (*use_rev1, *use_rev2))
            return DIFF_SAME;
        /* Fall through and do the diff. */
     }
@@ -712,14 +712,12 @@
      * The timestamp check is just for the default case of diffing the
      * workspace file against its base revision.
      */
-    else if (!*use_rev1
-             || (vers->vn_user
-                 && !strcmp (*use_rev1, vers->vn_user)))
+    else if (!*use_rev1 || (vers->vn_user && STREQ (*use_rev1, vers->vn_user)))
     {
        if ((empty_file == DIFF_DIFFERENT || empty_file == DIFF_CLIENT)
            && vers->ts_user != NULL
-           && strcmp (vers->ts_rcs, vers->ts_user) == 0
-           && (!(*options) || strcmp (options, vers->options) == 0))
+           && STREQ (vers->ts_rcs, vers->ts_user)
+           && (!(*options) || STREQ (options, vers->options)))
        {
            return DIFF_SAME;
        }
@@ -790,7 +788,7 @@
 
                exists = 0;
                /* special handling for TAG_HEAD */
-               if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0)
+               if (diff_rev1 && STREQ (diff_rev1, TAG_HEAD))
                {
                    char *head =
                        (vers->vn_rcs == NULL
@@ -835,7 +833,7 @@
            if (diff_rev1 || diff_date1)
            {
                /* special handling for TAG_HEAD */
-               if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0)
+               if (diff_rev1 && STREQ (diff_rev1, TAG_HEAD))
                {
                    char *head =
                        (vers->vn_rcs == NULL
@@ -905,7 +903,7 @@
                error (0, 0, "cannot find %s", finfo->fullname);
                goto out;
            }
-           else if (!strcmp (vers->ts_user, vers->ts_rcs)) 
+           else if (STREQ (vers->ts_user, vers->ts_rcs)) 
            {
                /* The user file matches some revision in the repository
                   Diff against the repository (for remote CVS, we might not
@@ -1110,7 +1108,7 @@
 {
     static struct diff_info di;
 
-    if (strcmp ("diff", cvs_cmd_name))
+    if (!STREQ ("diff", cvs_cmd_name))
        return NULL;
 
     di.diff_argc = diff_argc;

Index: edit.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/edit.c,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -b -r1.100 -r1.101
--- edit.c      12 Sep 2007 15:16:53 -0000      1.100
+++ edit.c      12 Sep 2007 17:27:22 -0000      1.101
@@ -249,7 +249,7 @@
        notifications stay in CVSADM_NOTIFY to be sent next time.  */
     if (current_parsed_root->isremote)
     {
-       if (strcmp (cvs_cmd_name, "release") != 0)
+       if (!STREQ (cvs_cmd_name, "release"))
        {
            start_server ();
            ign_setup ();
@@ -259,7 +259,7 @@
                                argv, local, W_LOCAL, 0, 0, NULL, 0, NULL);
 
        send_to_server ("noop\012", 0);
-       if (strcmp (cvs_cmd_name, "release") == 0)
+       if (STREQ (cvs_cmd_name, "release"))
            err += get_server_responses ();
        else
            err += get_responses_and_close ();
@@ -533,13 +533,13 @@
                break;
            case 'a':
                a_omitted = false;
-               if (strcmp (optarg, "edit") == 0)
+               if (STREQ (optarg, "edit"))
                    setting_tedit = true;
-               else if (strcmp (optarg, "unedit") == 0)
+               else if (STREQ (optarg, "unedit"))
                    setting_tunedit = true;
-               else if (strcmp (optarg, "commit") == 0)
+               else if (STREQ (optarg, "commit"))
                    setting_tcommit = true;
-               else if (strcmp (optarg, "all") == 0)
+               else if (STREQ (optarg, "all"))
                {
                    a_all = true;
                    a_none = false;
@@ -547,7 +547,7 @@
                    setting_tunedit = true;
                    setting_tcommit = true;
                }
-               else if (strcmp (optarg, "none") == 0)
+               else if (STREQ (optarg, "none"))
                {
                    a_none = true;
                    a_all = false;
@@ -837,7 +837,7 @@
     if (!((edlist == NULL && newlist == NULL)
          || (edlist != NULL
              && newlist != NULL
-             && strcmp (edlist, newlist) == 0)))
+             && STREQ (edlist, newlist))))
        fileattr_set (filename, "_editors", newlist);
     if (edlist != NULL)
        free (edlist);

Index: entries.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/entries.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -b -r1.72 -r1.73
--- entries.c   12 Sep 2007 15:16:54 -0000      1.72
+++ entries.c   12 Sep 2007 17:27:22 -0000      1.73
@@ -1114,7 +1114,7 @@
 
     entnode = subdir_record ('A', parent, dir);
 
-    if (entries != NULL && (parent == NULL || strcmp (parent, ".") == 0))
+    if (entries && (!parent || STREQ (parent, ".")))
        (void) AddEntryNode (entries, entnode);
     else
        Entnode_Destroy (entnode);
@@ -1135,7 +1135,7 @@
     entnode = subdir_record ('R', parent, dir);
     Entnode_Destroy (entnode);
 
-    if (entries != NULL && (parent == NULL || strcmp (parent, ".") == 0))
+    if (entries && (!parent || STREQ (parent, ".")))
     {
        Node *p;
 

Index: expand_path.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/expand_path.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- expand_path.c       2 Sep 2006 23:18:00 -0000       1.39
+++ expand_path.c       12 Sep 2007 17:27:22 -0000      1.40
@@ -109,23 +109,23 @@
 expand_variable (const char *name, const char *cvsroot,
                 const char *file, int line)
 {
-    if (!strcmp (name, CVSROOT_ENV))
+    if (STREQ (name, CVSROOT_ENV))
        return cvsroot;
-    else if (!strcmp (name, "RCSBIN"))
+    else if (STREQ (name, "RCSBIN"))
     {
        error (0, 0, "RCSBIN internal variable is no longer supported");
        return NULL;
     }
-    else if (!strcmp (name, EDITOR1_ENV))
+    else if (STREQ (name, EDITOR1_ENV))
        return Editor;
-    else if (!strcmp (name, EDITOR2_ENV))
+    else if (STREQ (name, EDITOR2_ENV))
        return Editor;
-    else if (!strcmp (name, EDITOR3_ENV))
+    else if (STREQ (name, EDITOR3_ENV))
        return Editor;
-    else if (!strcmp (name, "USER"))
+    else if (STREQ (name, "USER"))
        return getcaller ();
-    else if (!strcmp (name, "SESSIONID")
-            || !strcmp (name, "COMMITID"))
+    else if (STREQ (name, "SESSIONID")
+            || STREQ (name, "COMMITID"))
        return global_session_id;
     else if (isalpha (name[0]))
     {

Index: filesubr.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/filesubr.c,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -b -r1.112 -r1.113
--- filesubr.c  25 Aug 2007 03:17:58 -0000      1.112
+++ filesubr.c  12 Sep 2007 17:27:22 -0000      1.113
@@ -461,8 +461,7 @@
            {
                char *buf;
 
-               if (strcmp (dp->d_name, ".") == 0 ||
-                           strcmp (dp->d_name, "..") == 0)
+               if (STREQ (dp->d_name, ".") || STREQ (dp->d_name, ".."))
                    continue;
 
                buf = Xasprintf ("%s/%s", path, dp->d_name);
@@ -574,7 +573,7 @@
        int result;
        buf1 = Xreadlink (file1, sb1.st_size);
        buf2 = Xreadlink (file2, sb2.st_size);
-       result = (strcmp (buf1, buf2) == 0);
+       result = STREQ (buf1, buf2);
        free (buf1);
        free (buf2);
        return result;
@@ -855,6 +854,6 @@
 push_env_temp_dir (void)
 {
     const char *tmpdir = get_cvs_tmp_dir ();
-    if (tmpdir_env && strcmp (tmpdir_env, tmpdir))
+    if (tmpdir_env && !STREQ (tmpdir_env, tmpdir))
        setenv (TMPDIR_ENV, tmpdir, 1);
 }

Index: find_names.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/find_names.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- find_names.c        12 Sep 2007 15:16:54 -0000      1.48
+++ find_names.c        12 Sep 2007 17:27:22 -0000      1.49
@@ -72,7 +72,7 @@
 strip_rcsext (Node *p, void *closure)
 {
     char *s = p->key + strlen (p->key) - strlen (RCSEXT);
-    assert (!strcmp (s, RCSEXT));
+    assert (STREQ (s, RCSEXT));
     *s = '\0'; /* strip the ,v */
     return 0;
 }
@@ -243,7 +243,8 @@
     if (ISABSOLUTE (dir)
        && strncmp (dir, current_parsed_root->directory, strlen 
(current_parsed_root->directory)) == 0
        && ISSLASH (dir[strlen (current_parsed_root->directory)])
-       && strcmp (dir + strlen (current_parsed_root->directory) + 1, 
CVSROOTADM) == 0)
+       && STREQ (dir + strlen (current_parsed_root->directory) + 1,
+                 CVSROOTADM))
        skip_emptydir = 1;
 
     /* set up to read the dir */
@@ -254,11 +255,11 @@
     errno = 0;
     while (dp = CVS_READDIR (dirp))
     {
-       if (!strcmp (dp->d_name, ".") ||
-           !strcmp (dp->d_name, "..") ||
-           !strcmp (dp->d_name, CVSATTIC) ||
-           !strcmp (dp->d_name, CVSLCK) ||
-           !strcmp (dp->d_name, CVSREP))
+       if (STREQ (dp->d_name, ".")
+           || STREQ (dp->d_name, "..")
+           || STREQ (dp->d_name, CVSATTIC)
+           || STREQ (dp->d_name, CVSLCK)
+           || STREQ (dp->d_name, CVSREP))
            goto do_it_again;
 
        /* findnode() is going to be significantly faster than stat()
@@ -268,7 +269,7 @@
            goto do_it_again;
 
        if (skip_emptydir
-           && !strcmp (dp->d_name, CVSNULLREPOS))
+           && STREQ (dp->d_name, CVSNULLREPOS))
            goto do_it_again;
 
        if (!DIRENT_MIGHT_BE_DIR(dp))
@@ -519,7 +520,7 @@
 
        /* Ignore `.' && `..'.  */
        tmp = last_component (glist.gl_pathv[i]);
-       if (!strcmp (tmp, ".") || !strcmp (tmp, ".."))
+       if (STREQ (tmp, ".") || STREQ (tmp, ".."))
            continue;
 
        p = getnode ();

Index: hardlink.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/hardlink.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- hardlink.c  2 Sep 2006 23:18:00 -0000       1.17
+++ hardlink.c  12 Sep 2007 17:27:22 -0000      1.18
@@ -251,7 +251,7 @@
            ++p2;
 
        /* Compare the files' basenames. */
-       if (strcmp (p1, p2) != 0)
+       if (!STREQ (p1, p2))
            return 0;
 
        n1 = n1->next;

Index: hash.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/hash.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- hash.c      30 May 2007 23:20:43 -0000      1.50
+++ hash.c      12 Sep 2007 17:27:22 -0000      1.51
@@ -304,7 +304,7 @@
        for (q = list->hasharray[hashval]->hashnext;
             q != list->hasharray[hashval]; q = q->hashnext)
        {
-           if (strcmp (p->key, q->key) == 0)
+           if (STREQ (p->key, q->key))
                return -1;
        }
        q = list->hasharray[hashval];
@@ -370,7 +370,7 @@
        return NULL;
 
     for (p = head->hashnext; p != head; p = p->hashnext)
-       if (strcmp (p->key, key) == 0)
+       if (STREQ (p->key, key))
            return p;
     return NULL;
 }

Index: history.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/history.c,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -b -r1.101 -r1.102
--- history.c   12 Sep 2007 13:07:33 -0000      1.101
+++ history.c   12 Sep 2007 17:27:22 -0000      1.102
@@ -1450,7 +1450,7 @@
        {
            if (!**cpp)
                break;                  /* null user == accept */
-           if (!strcmp (hr->user, *cpp))       /* found listed user */
+           if (STREQ (hr->user, *cpp)) /* found listed user */
                break;
        }
        if (!count)
@@ -1524,7 +1524,7 @@
     {
        for (cpp = mod_list, count = mod_count; count; cpp++, count--)
        {
-           if (hr->mod && !strcmp (hr->mod, *cpp))     /* found module */
+           if (hr->mod && STREQ (hr->mod, *cpp))       /* found module */
                break;
        }
        if (!count)
@@ -1583,7 +1583,7 @@
        repos = xstrdup (lr->repos);
        if ((cp = strrchr (repos, '/')) != NULL)
        {
-           if (lr->mod && !strcmp (++cp, lr->mod))
+           if (lr->mod && STREQ (++cp, lr->mod))
            {
                (void) strcpy (cp, "*");
            }
@@ -1637,7 +1637,7 @@
        (void) sprintf (workdir, "%s%s", lr->dir, lr->end);
        if ((cp = strrchr (workdir, '/')) != NULL)
        {
-           if (lr->mod && !strcmp (++cp, lr->mod))
+           if (lr->mod && STREQ (++cp, lr->mod))
            {
                (void) strcpy (cp, "*");
            }
@@ -1646,7 +1646,7 @@
        (void) strcpy (repos, lr->repos);
        if ((cp = strrchr (repos, '/')) != NULL)
        {
-           if (lr->mod && !strcmp (++cp, lr->mod))
+           if (lr->mod && STREQ (++cp, lr->mod))
            {
                (void) strcpy (cp, "*");
            }
@@ -1713,37 +1713,37 @@
         * print a line at the allowed boundaries.
         */
 
-       if (!hr ||                      /* The last record */
-           strcmp (hr->user, lr->user) ||      /* User has changed */
-           strcmp (hr->mod, lr->mod) ||/* Module has changed */
-           (working &&                 /* If must match "workdir" */
-            (strcmp (hr->dir, lr->dir) ||      /*    and the 1st parts or */
-             strcmp (hr->end, lr->end))))      /*    the 2nd parts differ */
+       if (!hr                                 /* The last record */
+           || !STREQ (hr->user, lr->user)      /* User has changed */
+           || !STREQ (hr->mod, lr->mod)        /* Module has changed */
+           || (working                         /* If must match "workdir" */
+               && (!STREQ (hr->dir, lr->dir)   /* and the 1st parts or */
+                   || !STREQ (hr->end, lr->end))))/* the 2nd parts differ */
 
            return 1;
     }
     else if (modified)
     {
-       if (!last_entry ||              /* Don't want only last rec */
-           !hr ||                      /* Last entry is a "last entry" */
-           strcmp (hr->repos, lr->repos) ||    /* Repository has changed */
-           strcmp (hr->file, lr->file))/* File has changed */
+       if (!last_entry                      /* Don't want only last rec */
+           || !hr                           /* Last entry is a "last entry" */
+           || !STREQ (hr->repos, lr->repos) /* Repository has changed */
+           || !STREQ (hr->file, lr->file))  /* File has changed */
            return 1;
 
        if (working)
        {                               /* If must match "workdir" */
-           if (strcmp (hr->dir, lr->dir) ||    /*    and the 1st parts or */
-               strcmp (hr->end, lr->end))      /*    the 2nd parts differ */
+           if (!STREQ (hr->dir, lr->dir)       /*    and the 1st parts or */
+               || !STREQ (hr->end, lr->end))   /*    the 2nd parts differ */
                return 1;
        }
     }
     else if (module_report)
     {
-       if (!last_entry ||              /* Don't want only last rec */
-           !hr ||                      /* Last entry is a "last entry" */
-           strcmp (hr->mod, lr->mod) ||/* Module has changed */
-           strcmp (hr->repos, lr->repos) ||    /* Repository has changed */
-           strcmp (hr->file, lr->file))/* File has changed */
+       if (!last_entry                      /* Don't want only last rec */
+           || !hr                           /* Last entry is a "last entry" */
+           || !STREQ (hr->mod, lr->mod)     /* Module has changed */
+           || !STREQ (hr->repos, lr->repos) /* Repository has changed */
+           || !STREQ (hr->file, lr->file))  /* File has changed */
            return 1;
     }
     else

Index: ignore.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ignore.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -b -r1.60 -r1.61
--- ignore.c    12 Sep 2007 02:45:22 -0000      1.60
+++ ignore.c    12 Sep 2007 17:27:22 -0000      1.61
@@ -389,7 +389,7 @@
        subdirs = entriesHasAllSubdirs (entries);
 
     /* we get called with update_dir set to "." sometimes... strip it */
-    if (strcmp (update_dir, ".") == 0)
+    if (STREQ (update_dir, "."))
        xdir = "";
     else
        xdir = update_dir;
@@ -410,7 +410,7 @@
     while (errno = 0, dp = CVS_READDIR (dirp))
     {
        file = dp->d_name;
-       if (!strcmp (file, ".") || !strcmp (file, ".."))
+       if (STREQ (file, ".") || STREQ (file, ".."))
            continue;
        if (findnode_fn (ilist, file))
            continue;

Index: import.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/import.c,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -b -r1.187 -r1.188
--- import.c    12 Sep 2007 13:07:33 -0000      1.187
+++ import.c    12 Sep 2007 17:27:22 -0000      1.188
@@ -220,7 +220,7 @@
 
        RCS_check_tag (argv[i]);
        for (j = 1; j < i; j++)
-           if (strcmp (argv[j], argv[i]) == 0)
+           if (STREQ (argv[j], argv[i]))
                error (1, 0, "tag `%s' was specified more than once", argv[i]);
     }
 
@@ -490,15 +490,15 @@
     else
     {
        errno = 0;
-       while ((dp = CVS_READDIR (dirp)) != NULL)
+       while (dp = CVS_READDIR (dirp))
        {
-           if (strcmp (dp->d_name, ".") == 0 || strcmp (dp->d_name, "..") == 0)
+           if (STREQ (dp->d_name, ".") || STREQ (dp->d_name, ".."))
                goto one_more_time_boys;
 
            /* CVS directories are created in the temp directory by
               server.c because it doesn't special-case import.  So
               don't print a message about them, regardless of -I!.  */
-           if (server_active && strcmp (dp->d_name, CVSADM) == 0)
+           if (server_active && STREQ (dp->d_name, CVSADM))
                goto one_more_time_boys;
 
            /* FIXME: .#filename.sig is where the server currently saves the
@@ -752,8 +752,8 @@
        return 1;
     }
 
-    if (vers->srcfile->branch == NULL || inattic ||
-       strcmp (vers->srcfile->branch, vbranch) != 0)
+    if (!vers->srcfile->branch || inattic
+       || !STREQ (vers->srcfile->branch, vbranch))
     {
        conflicts++;
        letter = 'C';
@@ -1019,14 +1019,14 @@
        suffix = "";                    /* will use the default */
     for (i = 0;; i++)
     {
-       if (comtable[i].suffix == NULL)
+       if (!comtable[i].suffix)
        {
            /* Default.  Note we'll always hit this case before we
               ever return NULL.  */
            retval = comtable[i].comlead;
            break;
        }
-       if (strcmp (suffix, comtable[i].suffix) == 0)
+       if (STREQ (suffix, comtable[i].suffix))
        {
            retval = comtable[i].comlead;
            break;
@@ -1187,7 +1187,7 @@
        file_type == S_IFREG)
     {
        fpuser = CVS_FOPEN (userfile,
-                           ((key_opt != NULL && strcmp (key_opt, "b") == 0)
+                           ((key_opt != NULL && STREQ (key_opt, "b"))
                             ? "rb"
                             : "r")
            );
@@ -1261,7 +1261,7 @@
        goto write_error;
     }
 
-    if (key_opt != NULL && strcmp (key_opt, "kv") != 0)
+    if (key_opt != NULL && !STREQ (key_opt, "kv"))
     {
        if (fprintf (fprcs, "expand   @%s@;\012", key_opt) < 0)
        {
@@ -1345,7 +1345,7 @@
            TRACE (TRACE_DATA, "add_rcs_file: found signature.");
 
            rawsig = get_signature ("", userfile,
-                                   key_opt && !strcmp (key_opt, "b"),
+                                   key_opt && STREQ (key_opt, "b"),
                                    &rawlen);
            base64_encode_alloc (rawsig, rawlen, &b64sig);
            if (!b64sig) xalloc_die ();
@@ -1391,7 +1391,7 @@
                TRACE (TRACE_DATA, "add_rcs_file: found signature.");
 
                rawsig = get_signature ("", userfile,
-                                       key_opt && !strcmp (key_opt, "b"),
+                                       key_opt && STREQ (key_opt, "b"),
                                        &rawlen);
                base64_encode_alloc (rawsig, rawlen, &b64sig);
                if (!b64sig) xalloc_die ();

Index: lock.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/lock.c,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -b -r1.123 -r1.124
--- lock.c      12 Sep 2007 13:07:33 -0000      1.123
+++ lock.c      12 Sep 2007 17:27:22 -0000      1.124
@@ -209,7 +209,7 @@
                         strlen (current_parsed_root->directory)) == 0);
        short_repos = repository + strlen (current_parsed_root->directory) + 1;
 
-       if (strcmp (repository, current_parsed_root->directory) == 0)
+       if (STREQ (repository, current_parsed_root->directory))
            short_repos = ".";
        else
            assert (short_repos[-1] == '/');
@@ -1224,7 +1224,7 @@
 
     if (repository != NULL
        && (global_writelock.repository == NULL
-           || !strcmp (global_writelock.repository, repository)))
+           || STREQ (global_writelock.repository, repository)))
     {
        if (writelock == NULL)
        {

Index: log.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/log.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -b -r1.110 -r1.111
--- log.c       11 Jul 2006 20:00:04 -0000      1.110
+++ log.c       12 Sep 2007 17:27:22 -0000      1.111
@@ -209,7 +209,7 @@
 
     send_to_server ("Argument ", 0);
     send_to_server (option, 0);
-    if (strcmp (node->key, "@@MYSELF") == 0)
+    if (STREQ (node->key, "@@MYSELF"))
        /* It is a bare -w option.  Note that we must send it as
           -w rather than messing with getcaller() or something (which on
           the client will return garbage).  */
@@ -244,7 +244,7 @@
     int local = 0;
     struct option_revlist **prl;
 
-    is_rlog = (strcmp (cvs_cmd_name, "rlog") == 0);
+    is_rlog = STREQ (cvs_cmd_name, "rlog");
 
     if (argc == -1)
        usage (log_usage);
@@ -1122,7 +1122,7 @@
                nr->first = xstrdup (r->first);
            else
            {
-               if (baserev && strcmp (r->first, TAG_BASE) == 0)
+               if (baserev && STREQ (r->first, TAG_BASE))
                    nr->first = xstrdup (baserev);
                else if (RCS_nodeisbranch (rcs, r->first))
                    nr->first = RCS_whatbranch (rcs, r->first);
@@ -1136,13 +1136,13 @@
            }
 
            if (r->last == r->first || (r->last != NULL && r->first != NULL &&
-                                       strcmp (r->last, r->first) == 0))
+                                       STREQ (r->last, r->first)))
                nr->last = xstrdup (nr->first);
            else if (r->last == NULL || isdigit ((unsigned char) r->last[0]))
                nr->last = xstrdup (r->last);
            else
            {
-               if (baserev && strcmp (r->last, TAG_BASE) == 0)
+               if (baserev && STREQ (r->last, TAG_BASE))
                    nr->last = xstrdup (baserev);
                else if (RCS_nodeisbranch (rcs, r->last))
                    nr->last = RCS_whatbranch (rcs, r->last);
@@ -1191,7 +1191,7 @@
            }
            else if (nr->first == NULL || nr->last == NULL)
                nr->fields = 0;
-           else if (strcmp (nr->first, nr->last) == 0)
+           else if (STREQ (nr->first, nr->last))
                nr->fields = numdots (nr->last) + 1;
            else
            {

Index: login.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/login.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -b -r1.91 -r1.92
--- login.c     27 Aug 2007 02:11:05 -0000      1.91
+++ login.c     12 Sep 2007 17:27:23 -0000      1.92
@@ -151,7 +151,7 @@
                else
                {
                    *p = '\0';
-                   if (strcmp (cvsroot_canonical, q) == 0)
+                   if (STREQ (cvsroot_canonical, q))
                        password = p + 1;
                    *p = ' ';
                }
@@ -205,7 +205,7 @@
        }
        *p = ' ';
        tmp_root_canonical = normalize_cvsroot (tmp_root);
-       if (strcmp (cvsroot_canonical, tmp_root_canonical) == 0)
+       if (STREQ (cvsroot_canonical, tmp_root_canonical))
            password = p + 1;
 
        free (tmp_root_canonical);
@@ -374,7 +374,7 @@
      */
     if (!noexec && password != NULL && (operation == password_entry_delete
         || (operation == password_entry_add
-            && strcmp (password, newpassword))))
+            && !STREQ (password, newpassword))))
     {
        long found_at = line;
        char *tmp_name;
@@ -453,7 +453,7 @@
      * different password, append the new line
      */
     if (!noexec && operation == password_entry_add
-           && (password == NULL || strcmp (password, newpassword)))
+           && (password == NULL || !STREQ (password, newpassword)))
     {
        if ((fp = CVS_FOPEN (passfile, "a")) == NULL)
            error (1, errno, "could not open %s for writing", passfile);

Index: logmsg.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/logmsg.c,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -b -r1.109 -r1.110
--- logmsg.c    28 Aug 2007 17:33:13 -0000      1.109
+++ logmsg.c    12 Sep 2007 17:27:23 -0000      1.110
@@ -147,7 +147,7 @@
     {
         if (li->tag == NULL
            ? tag != NULL
-           : tag == NULL || strcmp (tag, li->tag) != 0)
+           : tag == NULL || !STREQ (tag, li->tag))
        {
            if (col > 0)
                (void) fprintf (fp, "\n");
@@ -219,7 +219,7 @@
        return;
 
     /* Abort before creation of the temp file if no editor is defined. */
-    if (strcmp (Editor, "") == 0)
+    if (STREQ (Editor, ""))
         error(1, 0, "no editor defined, must use -e or -m");
 
   again:
@@ -354,7 +354,7 @@
 
     /* canonicalize emply messages */
     if (*messagep != NULL &&
-        (**messagep == '\0' || strcmp (*messagep, "\n") == 0))
+        (**messagep == '\0' || STREQ (*messagep, "\n")))
     {
        free (*messagep);
        *messagep = NULL;
@@ -552,7 +552,7 @@
     FILE *tfp;
 
     /* nothing to do if the last one included is the same as this one */
-    if (last_template && strcmp (last_template, template) == 0)
+    if (last_template && STREQ (last_template, template))
        return (0);
     if (last_template)
        free (last_template);

Index: ls.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ls.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- ls.c        25 Aug 2007 03:17:58 -0000      1.22
+++ ls.c        12 Sep 2007 17:27:23 -0000      1.23
@@ -66,7 +66,7 @@
     int c;
     int err = 0;
 
-    is_rls = strcmp (cvs_cmd_name, "rls") == 0;
+    is_rls = STREQ (cvs_cmd_name, "rls");
 
     if (argc == -1)
        usage (ls_usage);
@@ -234,7 +234,7 @@
 
                /* Frontends like to do 'ls -q /', so we support it explicitly.
                  */
-               if (!strcmp (mod,"/"))
+               if (STREQ (mod,"/"))
                {
                    *mod='\0';
                }
@@ -307,7 +307,7 @@
         else
             printed = true;
 
-        if (!strcmp (p->key, ""))
+        if (STREQ (p->key, ""))
             cvs_output (".", 1);
         else
            cvs_output (p->key, 0);
@@ -465,7 +465,7 @@
      * directory in DIRS then this directory should be processed.
      */
 
-    if (strcmp (dir, "."))
+    if (!STREQ (dir, "."))
     {
         /* Search for our parent directory.  */
        char *parent;
@@ -507,7 +507,7 @@
     {
        /* Create a new list for this directory.  */
        p = getnode ();
-       p->key = xstrdup (strcmp (update_dir, ".") ? update_dir : "");
+       p->key = xstrdup (STREQ (update_dir, ".") ? "" : update_dir);
        p->data = getlist ();
         p->delproc = ls_delproc;
        addnode (callerdat, p);
@@ -551,7 +551,7 @@
 ls_dirleaveproc (void *callerdat, const char *dir, int err,
                  const char *update_dir, List *entries)
 {
-       if (created_dir && !strcmp (created_dir, update_dir))
+       if (created_dir && STREQ (created_dir, update_dir))
        {
                if (set_tag)
                {
@@ -591,7 +591,7 @@
 
        if (!quiet)
            error (0, 0, "Listing module: `%s'",
-                  strcmp (mname, "") ? mname : ".");
+                  STREQ (mname, "") ? "." : mname);
 
        repository = xmalloc (strlen (current_parsed_root->directory)
                              + strlen (argv[0])

Index: main.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/main.c,v
retrieving revision 1.274
retrieving revision 1.275
diff -u -b -r1.274 -r1.275
--- main.c      12 Sep 2007 13:15:50 -0000      1.274
+++ main.c      12 Sep 2007 17:27:23 -0000      1.275
@@ -408,7 +408,7 @@
 
     for (cm = cmds; cm->fullname; cm++)
     {
-       if (strcmp (cmd_name, cm->fullname) == 0)
+       if (STREQ (cmd_name, cm->fullname))
            break;
     }
     if (!cm->fullname)
@@ -706,12 +706,12 @@
     if (optind < argc
        && (false
 # if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI)
-           || !strcmp (argv[optind], "pserver")
+           || STREQ (argv[optind], "pserver")
 # endif
 # ifdef HAVE_KERBEROS
-           || !strcmp (argv[optind], "kserver")
+           || STREQ (argv[optind], "kserver")
 # endif /* HAVE_KERBEROS */
-           || !strcmp (argv[optind], "server")))
+           || STREQ (argv[optind], "server")))
        {
            /* Avoid any .cvsrc file.  */
            use_cvsrc = 0;
@@ -1034,11 +1034,11 @@
     cvs_cmd_name = argv[0];
     for (cm = cmds; cm->fullname; cm++)
     {
-       if (cm->nick1 && !strcmp (cvs_cmd_name, cm->nick1))
+       if (cm->nick1 && STREQ (cvs_cmd_name, cm->nick1))
            break;
-       if (cm->nick2 && !strcmp (cvs_cmd_name, cm->nick2))
+       if (cm->nick2 && STREQ (cvs_cmd_name, cm->nick2))
            break;
-       if (!strcmp (cvs_cmd_name, cm->fullname))
+       if (STREQ (cvs_cmd_name, cm->fullname))
            break;
     }
 
@@ -1104,7 +1104,7 @@
           running as Kerberos server as root.  Do the authentication as
           the very first thing, to minimize the amount of time we are
           running as root.  */
-       if (strcmp (cvs_cmd_name, "kserver") == 0)
+       if (STREQ (cvs_cmd_name, "kserver"))
        {
            kserver_authenticate_connection ();
 
@@ -1114,7 +1114,7 @@
 # endif /* HAVE_KERBEROS */
 
 # if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI)
-       if (strcmp (cvs_cmd_name, "pserver") == 0)
+       if (STREQ (cvs_cmd_name, "pserver"))
        {
            /* The reason that --allow-root is not a command option
               is mainly that it seems easier to make it a global option.  */
@@ -1130,7 +1130,7 @@
 # endif /* AUTH_SERVER_SUPPORT || HAVE_GSSAPI */
 #endif /* SERVER_SUPPORT */
 
-       server_active = strcmp (cvs_cmd_name, "server") == 0;
+       server_active = STREQ (cvs_cmd_name, "server");
 
 #ifdef SERVER_SUPPORT
        if (server_active)
@@ -1297,7 +1297,7 @@
                        save_errno = errno;
                        /* If this is "cvs init", the root need not exist yet.
                         */
-                       if (strcmp (cvs_cmd_name, "init"))
+                       if (!STREQ (cvs_cmd_name, "init"))
                            error (1, save_errno, "%s", path);
                    }
                    free (path);

Index: mkmodules.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/mkmodules.c,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -b -r1.106 -r1.107
--- mkmodules.c 29 Aug 2007 23:32:30 -0000      1.106
+++ mkmodules.c 12 Sep 2007 17:27:23 -0000      1.107
@@ -1173,7 +1173,7 @@
        /* If last_component() returns the empty string, then cp either
         * points at the system root or is the empty string itself.
         */
-       if (!*last_component (cp) || !strcmp (cp, "."))
+       if (!*last_component (cp) || STREQ (cp, "."))
            break;
 
        p = dir_name (cp);
@@ -1227,7 +1227,7 @@
 
     root_dir = in_repository (current_parsed_root->directory);
 
-    if (root_dir && strcmp (root_dir, current_parsed_root->directory))
+    if (root_dir && !STREQ (root_dir, current_parsed_root->directory))
        error (1, 0,
               "Cannot initialize repository under existing CVSROOT: `%s'",
               root_dir);

Index: no_diff.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/no_diff.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- no_diff.c   24 Apr 2006 18:50:26 -0000      1.39
+++ no_diff.c   12 Sep 2007 17:27:23 -0000      1.40
@@ -38,6 +38,7 @@
 /* CVS headers.  */
 #include "rcs.h"
 #include "server.h"
+#include "subr.h"
 #include "system.h"
 #include "vers_ts.h"
 #include "wrapper.h"
@@ -55,8 +56,7 @@
 
     /* If ts_user is "Is-modified", we can only conclude the files are
        different (since we don't have the file's contents).  */
-    if (vers->ts_user != NULL
-       && strcmp (vers->ts_user, "Is-modified") == 0)
+    if (vers->ts_user && STREQ (vers->ts_user, "Is-modified"))
        return -1;
 
     if (!vers->srcfile || !vers->srcfile->path)

Index: parseinfo.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/parseinfo.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -b -r1.91 -r1.92
--- parseinfo.c 28 Aug 2007 17:33:14 -0000      1.91
+++ parseinfo.c 12 Sep 2007 17:27:23 -0000      1.92
@@ -146,7 +146,7 @@
         */
 
        /* save the default value so we have it later if we need it */
-       if (strcmp (exp, "DEFAULT") == 0)
+       if (STREQ (exp, "DEFAULT"))
        {
            if (default_value)
            {
@@ -164,7 +164,7 @@
         * execute lots of ALL callbacks in addition to *one* regular matching
         * callback or default
         */
-       if (strcmp (exp, "ALL") == 0)
+       if (STREQ (exp, "ALL"))
        {
            if (!(opt & PIOPT_ALL))
                error (0, 0, "Keyword `ALL' is ignored at line %d in %s file",
@@ -566,7 +566,7 @@
            *p++ = '\0';
        else if (
                 /* The following keys have optional arguments.  */
-                strcmp (line, "VerifyCommits"))
+                !STREQ (line, "VerifyCommits"))
        {
            if (!parse_error (infopath, ln))
                error (0, 0,
@@ -576,7 +576,7 @@
        }
 
 
-       if (strcmp (line, "RCSBIN") == 0)
+       if (STREQ (line, "RCSBIN"))
        {
            /* This option used to specify the directory for RCS
               executables.  But since we don't run them any more,
@@ -584,7 +584,7 @@
               repository can work with either new or old CVS.  */
            ;
        }
-       else if (strcmp (line, "SystemAuth") == 0)
+       else if (STREQ (line, "SystemAuth"))
 #ifdef AUTH_SERVER_SUPPORT
            readBool (infopath, "SystemAuth", p, &retval->system_auth);
 #else
@@ -596,11 +596,11 @@
            readBool (infopath, "SystemAuth", p, &dummy);
        }
 #endif
-       else if (strcmp (line, "LocalKeyword") == 0)
+       else if (STREQ (line, "LocalKeyword"))
            RCS_setlocalid (infopath, ln, &retval->keywords, p);
-       else if (strcmp (line, "KeywordExpand") == 0)
+       else if (STREQ (line, "KeywordExpand"))
            RCS_setincexc (&retval->keywords, p);
-       else if (strcmp (line, "PreservePermissions") == 0)
+       else if (STREQ (line, "PreservePermissions"))
        {
 #ifdef PRESERVE_PERMISSIONS_SUPPORT
            readBool (infopath, "PreservePermissions", p,
@@ -612,9 +612,9 @@
                       infopath, ln);
 #endif
        }
-       else if (strcmp (line, "TopLevelAdmin") == 0)
+       else if (STREQ (line, "TopLevelAdmin"))
            readBool (infopath, "TopLevelAdmin", p, &retval->top_level_admin);
-       else if (strcmp (line, "LockDir") == 0)
+       else if (STREQ (line, "LockDir"))
        {
            if (retval->lock_dir)
                free (retval->lock_dir);
@@ -623,7 +623,7 @@
               opendir it or something, but I don't see any particular
               reason to do that now rather than waiting until lock.c.  */
        }
-       else if (strcmp (line, "HistoryLogPath") == 0)
+       else if (STREQ (line, "HistoryLogPath"))
        {
            if (retval->HistoryLogPath) free (retval->HistoryLogPath);
 
@@ -639,7 +639,7 @@
                retval->HistoryLogPath = NULL;
            }
        }
-       else if (strcmp (line, "HistorySearchPath") == 0)
+       else if (STREQ (line, "HistorySearchPath"))
        {
            if (retval->HistorySearchPath) free (retval->HistorySearchPath);
            retval->HistorySearchPath = expand_path (p, cvsroot, false,
@@ -654,9 +654,9 @@
                retval->HistorySearchPath = NULL;
            }
        }
-       else if (strcmp (line, "LogHistory") == 0)
+       else if (STREQ (line, "LogHistory"))
        {
-           if (strcmp (p, "all") != 0)
+           if (!STREQ (p, "all"))
            {
                static bool gotone = false;
                if (gotone)
@@ -669,7 +669,7 @@
                retval->logHistory = xstrdup (p);
            }
        }
-       else if (strcmp (line, "RereadLogAfterVerify") == 0)
+       else if (STREQ (line, "RereadLogAfterVerify"))
        {
            if (!strcasecmp (p, "never"))
              retval->RereadLogAfterVerify = LOGMSG_REREAD_NEVER;
@@ -689,10 +689,10 @@
                }
            }
        }
-       else if (strcmp (line, "FirstVerifyLogErrorFatal") == 0)
+       else if (STREQ (line, "FirstVerifyLogErrorFatal"))
            readBool (infopath, "FirstVerifyLogErrorFatal", p,
                      &retval->FirstVerifyLogErrorFatal);
-       else if (strcmp (line, "TmpDir") == 0)
+       else if (STREQ (line, "TmpDir"))
        {
            if (retval->TmpDir) free (retval->TmpDir);
            retval->TmpDir = expand_path (p, cvsroot, false, infopath, ln);
@@ -702,9 +702,9 @@
             * tries to create a temp file.
             */
        }
-       else if (strcmp (line, "UserAdminOptions") == 0)
+       else if (STREQ (line, "UserAdminOptions"))
            retval->UserAdminOptions = make_UserAdminOptions (infopath, ln, p);
-       else if (strcmp (line, "UseNewInfoFmtStrings") == 0)
+       else if (STREQ (line, "UseNewInfoFmtStrings"))
 #ifdef SUPPORT_OLD_INFO_FMT_STRINGS
            readBool (infopath, "UseNewInfoFmtStrings", p,
                      &retval->UseNewInfoFmtStrings);
@@ -718,31 +718,31 @@
                       infopath, ln);
        }
 #endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
-       else if (strcmp (line, "ImportNewFilesToVendorBranchOnly") == 0)
+       else if (STREQ (line, "ImportNewFilesToVendorBranchOnly"))
            readBool (infopath, "ImportNewFilesToVendorBranchOnly", p,
                      &retval->ImportNewFilesToVendorBranchOnly);
-       else if (strcmp (line, "PrimaryServer") == 0)
+       else if (STREQ (line, "PrimaryServer"))
            retval->PrimaryServer = parse_cvsroot (p);
 #ifdef PROXY_SUPPORT
-       else if (!strcmp (line, "MaxProxyBufferSize"))
+       else if (STREQ (line, "MaxProxyBufferSize"))
            readSizeT (infopath, "MaxProxyBufferSize", p,
                       &retval->MaxProxyBufferSize);
 #endif /* PROXY_SUPPORT */
-       else if (!strcmp (line, "MaxCommentLeaderLength"))
+       else if (STREQ (line, "MaxCommentLeaderLength"))
            readSizeT (infopath, "MaxCommentLeaderLength", p,
                       &retval->MaxCommentLeaderLength);
-       else if (!strcmp (line, "UseArchiveCommentLeader"))
+       else if (STREQ (line, "UseArchiveCommentLeader"))
            readBool (infopath, "UseArchiveCommentLeader", p,
                      &retval->UseArchiveCommentLeader);
 #ifdef SERVER_SUPPORT
-       else if (!strcmp (line, "MinCompressionLevel"))
+       else if (STREQ (line, "MinCompressionLevel"))
            readSizeT (infopath, "MinCompressionLevel", p,
                       &retval->MinCompressionLevel);
-       else if (!strcmp (line, "MaxCompressionLevel"))
+       else if (STREQ (line, "MaxCompressionLevel"))
            readSizeT (infopath, "MaxCompressionLevel", p,
                       &retval->MaxCompressionLevel);
 #endif /* SERVER_SUPPORT */
-       else if (!strcmp (line, "VerifyCommits"))
+       else if (STREQ (line, "VerifyCommits"))
        {
            if (retval->VerifyCommits != VERIFY_DEFAULT)
                error (0, 0,
@@ -769,7 +769,7 @@
                 */
            }
        }
-       else if (!strcmp (line, "VerifyTemplate"))
+       else if (STREQ (line, "VerifyTemplate"))
        {
            if (retval->VerifyTemplate)
            {
@@ -780,7 +780,7 @@
            }
            retval->VerifyTemplate = xstrdup (p);
        }
-       else if (!strcmp (line, "OpenPGPTextmode"))
+       else if (STREQ (line, "OpenPGPTextmode"))
        {
            if (retval->OpenPGPTextmode)
            {
@@ -791,7 +791,7 @@
            }
            retval->OpenPGPTextmode = xstrdup (p);
        }
-       else if (!strcmp (line, "VerifyArg"))
+       else if (STREQ (line, "VerifyArg"))
        {
            if (!retval->VerifyArgs) retval->VerifyArgs = getlist ();
            push_string (retval->VerifyArgs, xstrdup (p));

Index: patch.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/patch.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -b -r1.111 -r1.112
--- patch.c     27 Aug 2007 02:11:06 -0000      1.111
+++ patch.c     12 Sep 2007 17:27:23 -0000      1.112
@@ -445,7 +445,7 @@
 
     if ((vers_tag == NULL && vers_head == NULL) ||
         (vers_tag != NULL && vers_head != NULL &&
-        strcmp (vers_head, vers_tag) == 0))
+        STREQ (vers_head, vers_tag)))
     {
        /* Nothing known about specified revs or
         * not changed between releases.

Index: rcs.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/rcs.c,v
retrieving revision 1.387
retrieving revision 1.388
diff -u -b -r1.387 -r1.388
--- rcs.c       30 May 2007 23:20:43 -0000      1.387
+++ rcs.c       12 Sep 2007 17:27:23 -0000      1.388
@@ -27,11 +27,11 @@
 /* CVS headers.  */
 #include "edit.h"
 #include "gpg.h"
+#include "hardlink.h"
 #include "repos.h"
 #include "sign.h"
 
 #include "cvs.h"
-#include "hardlink.h"
 
 /* These need to be source after cvs.h or HAVE_MMAP won't be set... */
 #ifdef HAVE_MMAP
@@ -145,14 +145,9 @@
 static char *rcs_lockfilename (const char *);
 static int findnextmagicrev (RCSNode *rcs, char *rev, int default_rv);
 static int findnextmagicrev_proc (Node *p, void *closure);
+static char * getfullCVSname (char *, char **);
 
-/* The RCS file reading functions are called a lot, and they do some
-   string comparisons.  This macro speeds things up a bit by skipping
-   the function call when the first characters are different.  It
-   evaluates its arguments multiple times.  */
-#define STREQ(a, b) (*(char *)(a) == *(char *)(b) && strcmp ((a), (b)) == 0)
 
-static char * getfullCVSname (char *, char **);
 
 /*
  * We don't want to use isspace() from the C library because:
@@ -8223,14 +8218,14 @@
            error (1, 0, "unexpected end of file reading %s", rcsfile);
 
        /* The `desc' keyword is the end of the deltas. */
-       if (strcmp (key, RCSDESC) == 0)
+       if (STREQ (key, RCSDESC))
            break;
 
 #ifdef PRESERVE_PERMISSIONS_SUPPORT
 
        /* The `hardlinks' value is a group of words, which must
           be parsed separately and added as a list to vnode->hardlinks. */
-       if (strcmp (key, "hardlinks") == 0)
+       if (STREQ (key, "hardlinks"))
        {
            char *word;
 
@@ -9211,14 +9206,14 @@
     {
        char date[MAXDATELEN + 1];
        /* revs cannot be attached to /dev/null ... duh. */
-       assert (strcmp (DEVNULL, path));
+       assert (!STREQ (DEVNULL, path));
        RCS_getrevtime (rcs, rev, datebuf, 0);
        (void) date_to_internet (date, datebuf);
        label = Xasprintf ("-L%s\t%s\t%s", path, date, rev);
     }
     else if (ts_user)
     {
-       if (strcmp (ts_user, "Is-modified"))
+       if (!STREQ (ts_user, "Is-modified"))
        {
            struct timespec t;
            struct tm *wm;
@@ -9236,7 +9231,7 @@
        time_t t = 0;
        struct tm *wm = gmtime (&t);
 
-       assert (!strcmp (DEVNULL, path));
+       assert (STREQ (DEVNULL, path));
        tm_to_internet (datebuf, wm);
        label = Xasprintf ("-L%s\t%s", path, datebuf);
     }
@@ -9295,11 +9290,11 @@
 
     /* options? */
     while ((key = strtok (NULL, ",")) != NULL) {
-       if (!strcmp(key, keywords[KEYWORD_ID].string))
+       if (STREQ (key, keywords[KEYWORD_ID].string))
            keywords[KEYWORD_LOCALID].expandto = KEYWORD_ID;
-       else if (!strcmp(key, keywords[KEYWORD_HEADER].string))
+       else if (STREQ (key, keywords[KEYWORD_HEADER].string))
            keywords[KEYWORD_LOCALID].expandto = KEYWORD_HEADER;
-       else if (!strcmp(key, keywords[KEYWORD_CVSHEADER].string))
+       else if (STREQ (key, keywords[KEYWORD_CVSHEADER].string))
            keywords[KEYWORD_LOCALID].expandto = KEYWORD_CVSHEADER;
        else
        {
@@ -9359,7 +9354,7 @@
     key = strtok(next, ",");
     while (key) {
        for (keyword = keywords; keyword->string != NULL; keyword++) {
-           if (strcmp (keyword->string, key) == 0)
+           if (STREQ (keyword->string, key))
                keyword->expandit = include;
        }
        key = strtok(NULL, ",");

Index: rcscmds.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/rcscmds.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -b -r1.74 -r1.75
--- rcscmds.c   22 May 2006 19:17:39 -0000      1.74
+++ rcscmds.c   12 Sep 2007 17:27:23 -0000      1.75
@@ -130,9 +130,7 @@
        There may be ways around this, but I think they are fraught
        with danger. -twp */
 
-    if (preserve_perms &&
-       strcmp (file1, DEVNULL) != 0 &&
-       strcmp (file2, DEVNULL) != 0)
+    if (preserve_perms && !STREQ (file1, DEVNULL) && !STREQ (file2, DEVNULL))
     {
        struct stat sb1, sb2;
 

Index: recurse.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/recurse.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -b -r1.122 -r1.123
--- recurse.c   12 Sep 2007 13:07:34 -0000      1.122
+++ recurse.c   12 Sep 2007 17:27:23 -0000      1.123
@@ -299,7 +299,7 @@
            cvsroot_t *root = Name_Root (NULL, update_dir);
            if (root)
            {
-               if (strcmp (root->original, original_parsed_root->original))
+               if (!STREQ (root->original, original_parsed_root->original))
                    /* We're skipping this directory because it is for
                     * a different root.  Therefore, we just want to
                     * do the subdirectories only.  Processing files would
@@ -719,11 +719,8 @@
        if (this_root != NULL)
        {
            if (findnode (root_directories, this_root->original))
-           {
-               process_this_directory =
-                   !strcmp (original_parsed_root->original,
+               process_this_directory = STREQ (original_parsed_root->original,
                             this_root->original);
-           }
            else
            {
                /* Add it to our list. */
@@ -1059,9 +1056,9 @@
     strcpy (update_dir, saved_update_dir);
 
     /* set up update_dir - skip dots if not at start */
-    if (strcmp (dir, ".") != 0)
+    if (!STREQ (dir, "."))
     {
-       if (update_dir[0] != '\0')
+       if (update_dir[0])
        {
            (void) strcat (update_dir, "/");
            (void) strcat (update_dir, dir);
@@ -1168,11 +1165,8 @@
        if (this_root != NULL)
        {
            if (findnode (root_directories, this_root->original))
-           {
-               process_this_directory =
-                   !strcmp (original_parsed_root->original,
+               process_this_directory = STREQ (original_parsed_root->original,
                             this_root->original);
-           }
            else
            {
                /* Add it to our list. */
@@ -1235,7 +1229,7 @@
            dir_return = R_SKIP_DIRS;
 
        /* remember if the `.' will be stripped for subsequent dirs */
-       if (strcmp (update_dir, ".") == 0)
+       if (STREQ (update_dir, "."))
        {
            update_dir[0] = '\0';
            stripped_dot = 1;
@@ -1250,7 +1244,7 @@
         */
        if (repository)
        {
-           if (strcmp (dir, ".") == 0)
+           if (STREQ (dir, "."))
                xframe.repository = xstrdup (repository);
            else
                xframe.repository = Xasprintf ("%s/%s", repository, dir);
@@ -1350,7 +1344,7 @@
     save_dirlist = dirlist;
     dirlist = NULL;
 
-    if (strcmp(p->key, ".") != 0)
+    if (!STREQ (p->key, "."))
     {
         if (save_cwd (&cwd))
            error (1, errno, "Failed to save current directory.");

Index: root.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/root.c,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -b -r1.128 -r1.129
--- root.c      27 Aug 2007 02:11:06 -0000      1.128
+++ root.c      12 Sep 2007 17:27:24 -0000      1.129
@@ -1182,7 +1182,7 @@
     if (get_local_root_dir_done)
        return 0;
 
-    if (c->PrimaryServer && !strcmp (*r, c->PrimaryServer->directory))
+    if (c->PrimaryServer && STREQ (*r, c->PrimaryServer->directory))
     {
        free (*r);
        *r = xstrdup (p->key);

Index: run.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/run.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- run.c       24 Apr 2006 18:50:27 -0000      1.63
+++ run.c       12 Sep 2007 17:27:24 -0000      1.64
@@ -267,7 +267,7 @@
        ** This prevents a user from creating a privileged shell
        ** from the text editor when the SETXID_SUPPORT option is selected.
        */
-       if (!strcmp (run_argv[0], Editor) && setegid (getgid ()))
+       if (STREQ (run_argv[0], Editor) && setegid (getgid ()))
        {
            error (0, errno, "cannot set egid to gid");
            _exit (127);

Index: server.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/server.c,v
retrieving revision 1.479
retrieving revision 1.480
diff -u -b -r1.479 -r1.480
--- server.c    12 Sep 2007 13:07:34 -0000      1.479
+++ server.c    12 Sep 2007 17:27:24 -0000      1.480
@@ -206,7 +206,7 @@
     int retval, done;
     FILE *f;
 
-    if (strcmp (dir, ".") == 0)
+    if (STREQ (dir, "."))
        return 0;                       /* nothing to do */
 
     /* Allocate some space for our directory-munging string. */
@@ -605,7 +605,7 @@
     struct response *rs;
 
     for (rs = responses; rs->name != NULL; ++rs)
-       if (strcmp (rs->name, name) == 0)
+       if (STREQ (rs->name, name))
            return rs->status == rs_supported;
     error (1, 0, "internal error: testing support for unknown response?");
     /* NOTREACHED */
@@ -697,7 +697,7 @@
            *q++ = '\0';
        for (rs = responses; rs->name != NULL; ++rs)
        {
-           if (strcmp (rs->name, p) == 0)
+           if (STREQ (rs->name, p))
                break;
        }
        if (rs->name == NULL)
@@ -877,7 +877,7 @@
 # ifdef AUTH_SERVER_SUPPORT
     if (Pserver_Repos != NULL)
     {
-       if (strcmp (Pserver_Repos, current_parsed_root->directory) != 0)
+       if (!STREQ (Pserver_Repos, current_parsed_root->directory))
        {
            /* The explicitness is to aid people who are writing clients.
               I don't see how this information could help an
@@ -1236,7 +1236,7 @@
     if (gupdate_dir != NULL)
        free (gupdate_dir);
 
-    if (!strcmp (dir, "."))
+    if (STREQ (dir, "."))
        gupdate_dir = xstrdup ("");
     else
        gupdate_dir = xstrdup (dir);
@@ -1310,10 +1310,9 @@
     /* Non-remote CVS handles a module representing the entire tree
        (e.g., an entry like ``world -a .'') by putting /. at the end
        of the Repository file, so we do the same.  */
-    if (strcmp (dir, ".") == 0
-       && current_parsed_root != NULL
-       && current_parsed_root->directory != NULL
-       && strcmp (current_parsed_root->directory, repos) == 0)
+    if (STREQ (dir, ".")
+       && current_parsed_root && current_parsed_root->directory
+       && STREQ (current_parsed_root->directory, repos))
     {
        if (fprintf (f, "/.") < 0)
        {
@@ -3428,7 +3427,7 @@
                  if (num_red > 0 && linebuf[num_red - 1] == '\n')
                      linebuf[num_red - 1] = '\0';
 
-                 if (strcmp (linebuf, CVS_Username) == 0)
+                 if (STREQ (linebuf, CVS_Username))
                      goto handle_invalid;
              }
             if (num_red < 0 && !feof (fp))
@@ -3483,7 +3482,7 @@
             if (num_red > 0 && linebuf[num_red - 1] == '\n')
                 linebuf[num_red - 1] = '\0';
 
-            if (strcmp (linebuf, CVS_Username) == 0)
+            if (STREQ (linebuf, CVS_Username))
             {
                 found_it = 1;
                 break;
@@ -4957,7 +4956,7 @@
      * [It probably doesn't matter if do_cvs_command() gets "export"
      *  or "checkout", but we ought to be accurate where possible.]
      */
-    do_cvs_command (!strcmp (cvs_cmd_name, "export") ? "export" : "checkout",
+    do_cvs_command (STREQ (cvs_cmd_name, "export") ? "export" : "checkout",
                    checkout);
 }
 
@@ -5225,7 +5224,7 @@
            return;
        }
 
-       if (strcmp (cvs_cmd_name, "export")
+       if (!STREQ (cvs_cmd_name, "export")
            && supported_response ("Base-entry"))
        {
            /* The client was already asked to create the base file and copy
@@ -5314,9 +5313,9 @@
                       finfo->fullname);
        }
     }
-    else if (scratched_file != NULL && entries_line == NULL)
+    else if (scratched_file && !entries_line)
     {
-       if (strcmp (scratched_file, finfo->file) != 0)
+       if (!STREQ (scratched_file, finfo->file))
            error (1, 0,
                   "CVS server internal error: `%s' vs. `%s' scratched",
                   scratched_file,
@@ -6919,9 +6918,8 @@
            host_user_tmp = username;
 
        /* Verify blank passwords directly, otherwise use crypt(). */
-       if ((found_password == NULL)
-           || ((strcmp (found_password, crypt (password, found_password))
-                == 0)))
+       if (!found_password
+           || STREQ (found_password, crypt (password, found_password)))
        {
            /* Give host_user_ptr permanent storage. */
            *host_user_ptr = xstrdup (host_user_tmp);
@@ -7124,7 +7122,7 @@
     if (*found_passwd)
     {
        /* user exists and has a password */
-       if (strcmp (found_passwd, crypt (password, found_passwd)) == 0)
+       if (STREQ (found_passwd, crypt (password, found_passwd)))
            return 1;
        else
        {
@@ -7328,11 +7326,11 @@
     /* Make sure the protocol starts off on the right foot... */
     pserver_read_line (&tmp, NULL);
 
-    if (strcmp (tmp, "BEGIN VERIFICATION REQUEST") == 0)
+    if (STREQ (tmp, "BEGIN VERIFICATION REQUEST"))
        verify_and_exit = 1;
-    else if (strcmp (tmp, "BEGIN AUTH REQUEST") == 0)
+    else if (STREQ (tmp, "BEGIN AUTH REQUEST"))
        ;
-    else if (strcmp (tmp, "BEGIN GSSAPI REQUEST") == 0)
+    else if (STREQ (tmp, "BEGIN GSSAPI REQUEST"))
     {
 #ifdef HAVE_GSSAPI
        free (tmp);
@@ -7342,7 +7340,7 @@
        error (1, 0, "GSSAPI authentication not supported by this server");
 #endif
     }
-    else if (strcmp (tmp, "BEGIN GSSAPI-U REQUEST") == 0)
+    else if (STREQ (tmp, "BEGIN GSSAPI-U REQUEST"))
     {
 #ifdef HAVE_GSSAPI
        free (tmp);
@@ -7374,13 +7372,10 @@
     /* ... and make sure the protocol ends on the right foot. */
     /* See above comment about error handling.  */
     pserver_read_line (&tmp, NULL);
-    if (strcmp (tmp,
-               verify_and_exit ?
-               "END VERIFICATION REQUEST" : "END AUTH REQUEST")
-       != 0)
-    {
+    if (!STREQ (tmp,
+               verify_and_exit ? "END VERIFICATION REQUEST"
+                               : "END AUTH REQUEST"))
        error (1, 0, "bad auth protocol end: %s", tmp);
-    }
     free (tmp);
 
     if (!root_allow_ok (repository))
@@ -8105,9 +8100,9 @@
 #endif /* SERVER_SUPPORT */
     {
        /* No MT support or we are using a local repository. */
-       if (strcmp (tag, "newline") == 0)
+       if (STREQ (tag, "newline"))
            cvs_output ("\n", 1);
-       else if (strcmp (tag, "date") == 0)
+       else if (STREQ (tag, "date"))
        {
 #ifdef SERVER_SUPPORT
            if (server_active)
@@ -8223,17 +8218,17 @@
     if (/* Not sending a temp file...  */
        !istemp
        /* ...and entry rev and new rev are the same...  */
-       && prev && !strcmp (prev, rev)
+       && prev && STREQ (prev, rev)
        /* ...and... */
        && (   /* ...both option specs are empty...  */
            (  (!poptions || !poptions[0]) && (!options || !options[0]))
               /* ...or the option specs match...  */
-           || (poptions && options && !strcmp (poptions, options)))
+           || (poptions && options && STREQ (poptions, options)))
        /* ...and... */
        && (   /* ...both tag specs are empty...  */
            (  (!ptag || !ptag[0]) && (!tag || !tag[0]))
               /* ...or the tag specs match.  */
-           || (ptag && tag && !strcmp (ptag, tag)))
+           || (ptag && tag && STREQ (ptag, tag)))
        )
        /* PREV & REV are the same, so the client should already have this
         * base file.
@@ -8245,7 +8240,7 @@
     /* FIXME: It would be more efficient if diffs could be sent when the
      * revision numbers haven't changed but the keywords have.
      */
-    if (prev && strcmp (prev, "0") && strcmp (prev, rev))
+    if (prev && !STREQ (prev, "0") && !STREQ (prev, rev))
     {
        /* Compute and send diff.  */
        int dargc = 0;
@@ -8444,15 +8439,15 @@
     output_dir (finfo->update_dir, finfo->repository);
     buf_output0 (protocol, finfo->file);
     buf_output (protocol, "\n", 1);
-    buf_output0 (protocol, strcmp (f1, DEVNULL) ? "TEMP" : "DEVNULL");
+    buf_output0 (protocol, STREQ (f1, DEVNULL) ? "DEVNULL" : "TEMP");
     buf_output (protocol, "\n", 1);
     buf_output0 (protocol, rev1 ? rev1 : "");
     buf_output (protocol, "\n", 1);
     buf_output0 (protocol, label1 ? label1 : "");
     buf_output (protocol, "\n", 1);
-    buf_output0 (protocol, strcmp (f2, DEVNULL)
-                          ? (rev2 ? "TEMP" : "WORKFILE")
-                          : "DEVNULL");
+    buf_output0 (protocol, STREQ (f2, DEVNULL)
+                          ? "DEVNULL"
+                          : (rev2 ? "TEMP" : "WORKFILE"));
     buf_output (protocol, "\n", 1);
     buf_output0 (protocol, rev2 ? rev2 : "");
     buf_output (protocol, "\n", 1);

Index: sign.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/sign.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- sign.c      30 May 2007 23:20:44 -0000      1.12
+++ sign.c      12 Sep 2007 17:27:24 -0000      1.13
@@ -410,8 +410,9 @@
         return 1;
     }
 
-    if (strcmp (vers->ts_conflict
-               ? vers->ts_conflict : vers->ts_rcs, vers->ts_user))
+    if (!STREQ (vers->ts_conflict
+               ? vers->ts_conflict : vers->ts_rcs,
+               vers->ts_user))
     {
        char *basefn = make_base_file_name (finfo->file, vers->ts_user);
        if (!isfile (basefn))

Index: subr.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/subr.c,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -b -r1.160 -r1.161
--- subr.c      12 Sep 2007 02:45:23 -0000      1.160
+++ subr.c      12 Sep 2007 17:27:24 -0000      1.161
@@ -1959,14 +1959,14 @@
 {
     TRACE (TRACE_FLOW, "readBool (%s, %s, %s)", infopath, option, p);
     if (!strcasecmp (p, "no") || !strcasecmp (p, "false")
-        || !strcasecmp (p, "off") || !strcmp (p, "0"))
+        || !strcasecmp (p, "off") || STREQ (p, "0"))
     {
        TRACE (TRACE_DATA, "Read %d for %s", *val, option);
        *val = false;
        return true;
     }
     else if (!strcasecmp (p, "yes") || !strcasecmp (p, "true")
-            || !strcasecmp (p, "on") || !strcmp (p, "1"))
+            || !strcasecmp (p, "on") || STREQ (p, "1"))
     {
        TRACE (TRACE_DATA, "Read %d for %s", *val, option);
        *val = true;
@@ -2083,7 +2083,7 @@
     char *p1, *p2;
     bool same;
 
-    if (!strcmp (path1_in, path2_in))
+    if (STREQ (path1_in, path2_in))
        return true;
 
     /* Path didn't match, but try to resolve any links that may be
@@ -2095,10 +2095,10 @@
 
     p1 = xcanonicalize_file_name (path1_in);
     p2 = xcanonicalize_file_name (path2_in);
-    if (strcmp (p1, p2))
-       same = false;
-    else
+    if (STREQ (p1, p2))
        same = true;
+    else
+       same = false;
 
     free (p1);
     free (p2);
@@ -2187,7 +2187,7 @@
        char **grnam;
        
        for (grnam = grp->gr_mem; *grnam; grnam++)
-           if (strcmp (*grnam, me) == 0) break;
+           if (STREQ (*grnam, me)) break;
        if (!*grnam && getgid() != grp->gr_gid)
            return false;
     }
@@ -2211,7 +2211,7 @@
        && (flags & MD_FATAL || !(flags & MD_QUIET)))
     {
        bool uud = update_dir && strlen (update_dir)
-                  && strcmp (update_dir, ".");
+                  && !STREQ (update_dir, ".");
        error (flags & MD_FATAL, errno, "cannot make directory `%s%s%s'",
               uud ? update_dir : "", uud ? "/" : "", name);
     }
@@ -2355,7 +2355,7 @@
        && (flags & MD_FATAL || !(flags & MD_QUIET)))
     {
        bool uud = update_dir && strlen (update_dir)
-                  && strcmp (update_dir, ".");
+                  && !STREQ (update_dir, ".");
        error (flags & MD_FATAL, errno, "cannot make directory tree `%s%s%s'",
               uud ? update_dir : "", uud ? "/" : "", name);
     }
@@ -2426,7 +2426,7 @@
 
        TRACE (TRACE_DATA, "dir_append (%s, %s)", dir, append);
 
-       if (!strlen (append) || !strcmp (append, "."))
+       if (!strlen (append) || STREQ (append, "."))
            continue;
 
        if (!strlen (retval))

Index: subr.h
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/subr.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- subr.h      12 Sep 2007 02:45:23 -0000      1.14
+++ subr.h      12 Sep 2007 17:27:24 -0000      1.15
@@ -133,4 +133,24 @@
 
 char *dir_append (const char *dir, const char *append);
 char *dir_append_dirs (const char *dir, ...);
+
+
+
+/* The STREQ macro speeds string comparison up a bit by skipping the function
+ * call to strcmp() when the first characters are different.  The inlined
+ * streq() call is necessary to avoid evaluating the macro arguments more than
+ * once, but we don't want to do that with a compiler that doesn't deal
+ * effectively with the inline keyword.
+ */
+#ifdef HAVE_INLINE
+static inline bool
+streq (const char *a, const char *b)
+{
+    return *a == *b && strcmp (a, b) == 0;
+}
+# define STREQ(a, b) streq ((a), (b))
+#else /* !HAVE_INLINE */
+# define STREQ(a, b) (strcmp ((a), (b)) == 0)
+#endif /* HAVE_INLINE */
+
 #endif /* !SUBR_H */

Index: tag.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/tag.c,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -b -r1.151 -r1.152
--- tag.c       12 Sep 2007 13:07:34 -0000      1.151
+++ tag.c       12 Sep 2007 17:27:24 -0000      1.152
@@ -145,7 +145,7 @@
     int err = 0;
     bool run_module_prog = true;
 
-    is_rtag = (strcmp (cvs_cmd_name, "rtag") == 0);
+    is_rtag = STREQ (cvs_cmd_name, "rtag");
 
     if (argc == -1)
        usage (is_rtag ? rtag_usage : tag_usage);
@@ -688,7 +688,7 @@
            ti->rev = NULL;
 #endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
        }
-        else if (strcmp (ti->oldrev, p->data) == 0)
+        else if (STREQ (ti->oldrev, p->data))
             addit = 0;
         else if (!force_tag_move)
             addit = 0;
@@ -1017,7 +1017,7 @@
     }
     if (numtag
        && isdigit ((unsigned char)*numtag)
-       && strcmp (numtag, version) != 0)
+       && !STREQ (numtag, version))
     {
 
        /*
@@ -1056,7 +1056,7 @@
             * if versions the same and neither old or new are branches don't
             * have to do anything
             */
-           if (strcmp (version, oversion) == 0 && !branch_mode && !isbranch)
+           if (STREQ (version, oversion) && !branch_mode && !isbranch)
            {
                free (oversion);
                goto free_vars_and_return;
@@ -1264,7 +1264,7 @@
         version = nversion;
     if (!version)
        goto free_vars_and_return;
-    else if (strcmp (version, "0") == 0)
+    else if (STREQ (version, "0"))
     {
        if (!quiet)
            error (0, 0, "couldn't tag added but un-commited file `%s'",
@@ -1304,7 +1304,7 @@
         * if versions the same and neither old or new are branches don't have
         * to do anything
         */
-       if (strcmp (version, oversion) == 0 && !branch_mode && !isbranch)
+       if (STREQ (version, oversion) && !branch_mode && !isbranch)
        {
            free (oversion);
            if (branch_mode)
@@ -1669,8 +1669,7 @@
     }
 
     /* Special tags are always valid.  */
-    if (strcmp (name, TAG_BASE) == 0
-       || strcmp (name, TAG_HEAD) == 0)
+    if (STREQ (name, TAG_BASE) || STREQ (name, TAG_HEAD))
     {
        /* insert is not possible for numeric revisions */
        assert (!valid);

Index: update.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/update.c,v
retrieving revision 1.274
retrieving revision 1.275
diff -u -b -r1.274 -r1.275
--- update.c    12 Sep 2007 15:16:54 -0000      1.274
+++ update.c    12 Sep 2007 17:27:24 -0000      1.275
@@ -857,7 +857,7 @@
     }
 
     /* Clean up CVS admin dirs if we are export */
-    if (strcmp (cvs_cmd_name, "export") == 0)
+    if (STREQ (cvs_cmd_name, "export"))
     {
        /* I'm not sure the existence_error is actually possible (except
           in cases where we really should print a message), but since
@@ -1050,7 +1050,7 @@
        update_dirent_proc, and we're now done with that subdirectory,
        undo the tag/date setting.  Note that we know that the tag and
        date were both originally NULL in this case.  */
-    if (tag_update_dir != NULL && strcmp (update_dir, tag_update_dir) == 0)
+    if (tag_update_dir && STREQ (update_dir, tag_update_dir))
     {
        if (tag != NULL)
        {
@@ -1122,10 +1122,9 @@
     errno = 0;
     while (dp = CVS_READDIR (dirp))
     {
-       if (strcmp (dp->d_name, ".") != 0
-           && strcmp (dp->d_name, "..") != 0)
+       if (!STREQ (dp->d_name, ".") && !STREQ (dp->d_name, ".."))
        {
-           if (strcmp (dp->d_name, CVSADM) != 0)
+           if (!STREQ (dp->d_name, CVSADM))
            {
                /* An entry other than the CVS directory.  The directory
                   is certainly not empty. */
@@ -1368,7 +1367,7 @@
 
            xvers_ts = Version_TS (finfo, options, tag, date, 
                                   force_tag_match, set_time);
-           if (strcmp (xvers_ts->options, "-V4") == 0)
+           if (STREQ (xvers_ts->options, "-V4"))
                xvers_ts->options[0] = '\0';
 
            (void) time (&last_register_time);
@@ -1424,7 +1423,7 @@
            }
 
            /* If this is really Update and not Checkout, recode history */
-           if (strcmp (cvs_cmd_name, "update") == 0)
+           if (STREQ (cvs_cmd_name, "update"))
                history_write ('U', finfo->update_dir, xvers_ts->vn_rcs,
                               finfo->file, finfo->repository);
 
@@ -1520,7 +1519,7 @@
 
     /* If this file has been marked as being binary, then never send a
        patch.  */
-    if (strcmp (vers_ts->options, "-kb") == 0)
+    if (STREQ (vers_ts->options, "-kb"))
     {
        *docheckout = 1;
        return 0;
@@ -1688,7 +1687,7 @@
                   finfo->fullname);
        c = fread (buf, 1, sizeof BINARY - 1, e);
        buf[c] = '\0';
-       if (strcmp (buf, BINARY) == 0)
+       if (STREQ (buf, BINARY))
        {
            /* These are binary files.  We could use diff -a, but
               patch can't handle that.  */
@@ -1718,7 +1717,7 @@
           don't really know what it does.  */
         xvers_ts = Version_TS (finfo, options, tag, date,
                               force_tag_match, 0);
-       if (strcmp (xvers_ts->options, "-V4") == 0)
+       if (STREQ (xvers_ts->options, "-V4"))
            xvers_ts->options[0] = '\0';
 
        Register (finfo->entries, finfo->file, xvers_ts->vn_rcs,
@@ -1729,7 +1728,7 @@
            error (1, errno, "could not stat %s", finfo->file);
 
        /* If this is really Update and not Checkout, record history.  */
-       if (strcmp (cvs_cmd_name, "update") == 0)
+       if (STREQ (cvs_cmd_name, "update"))
            history_write ('P', finfo->update_dir, xvers_ts->vn_rcs,
                           finfo->file, finfo->repository);
 
@@ -1909,7 +1908,7 @@
     copy_file (finfo->file, backup);
     xchmod (finfo->file, 1);
 
-    if (strcmp (vers->options, "-kb") == 0
+    if (STREQ (vers->options, "-kb")
        || wrap_merge_is_copy (finfo->file)
        || special_file_mismatch (finfo, NULL, vers->vn_rcs))
     {
@@ -1979,7 +1978,7 @@
     }
     base_remove (finfo->file, vers->vn_user);
 
-    if (strcmp (vers->options, "-V4") == 0)
+    if (STREQ (vers->options, "-V4"))
        vers->options[0] = '\0';
 
     /* fix up the vers structure, in case it is used by join */
@@ -2202,9 +2201,8 @@
           resolve.  No_Difference will already have been called in
           this case, so comparing the timestamps is sufficient to
           determine whether the file is locally modified.  */
-       if (strcmp (vers->vn_user, "0") == 0
-           || (vers->ts_user != NULL
-               && strcmp (vers->ts_user, vers->ts_rcs) != 0))
+       if (STREQ (vers->vn_user, "0")
+           || (vers->ts_user && !STREQ (vers->ts_user, vers->ts_rcs)))
        {
            if (jdate2 != NULL)
                error (0, 0,
@@ -2228,10 +2226,9 @@
            been changed since the greatest common ancestor (rev1),
            then there is a conflict we can not resolve.  See above for
            the rationale.  */
-       if (join_rev2 == NULL
-           && strcmp (rev1, vers->vn_user) != 0)
+       if (!join_rev2 && !STREQ (rev1, vers->vn_user))
        {
-           if (jdate2 != NULL)
+           if (jdate2)
                error (0, 0,
                       "file %s has been modified, but has been removed in 
revision %s as of %s",
                       finfo->fullname, jrev2, jdate2);
@@ -2295,7 +2292,7 @@
      * revision check tha comes next.  Otherwise, rev1 can == rev2 and get an
      * "already contains the changes between <rev1> and <rev1>" message.
      */
-    if (rev1 && strcmp (rev1, rev2) == 0)
+    if (rev1 && STREQ (rev1, rev2))
     {
        free (rev1);
        free (rev2);
@@ -2307,9 +2304,9 @@
      * revision.  i.e. we know that diff3(file2,file1,file2) will produce
      * file2.
      */
-    if (vers->vn_user != NULL && vers->ts_user != NULL
-        && strcmp (vers->ts_user, vers->ts_rcs) == 0
-        && strcmp (rev2, vers->vn_user) == 0)
+    if (vers->vn_user && vers->ts_user
+        && STREQ (vers->ts_user, vers->ts_rcs)
+        && STREQ (rev2, vers->vn_user))
     {
        if (!quiet)
        {
@@ -2467,12 +2464,12 @@
        similar to the RCS_merge, but in the binary file case,
        RCS_merge gives all kinds of trouble.  */
     replace_it =
-       vers->vn_user && !strcmp (rev1, vers->vn_user)
+       vers->vn_user && STREQ (rev1, vers->vn_user)
        /* See comments above about how No_Difference has already been
           called.  */
-       && vers->ts_user && !strcmp (vers->ts_user, vers->ts_rcs);
+       && vers->ts_user && STREQ (vers->ts_user, vers->ts_rcs);
 
-    if (!strcmp (vers->options, "-kb")
+    if (STREQ (vers->options, "-kb")
        || special_file_mismatch (finfo, rev1, rev2)
        || replace_it)
     {
@@ -2567,7 +2564,7 @@
        basefile = make_base_file_name (finfo->file, vers->vn_user);
        if (!noexec
            && ((isfile (basefile) && !xcmp (basefile, finfo->file))
-               || (strcmp (vers->vn_user, "0")
+               || (!STREQ (vers->vn_user, "0")
                    && !RCS_cmp_file (finfo->rcs, vers->tag, vers->vn_user,
                                      NULL, NULL, vers->options,
                                      finfo->file))))
@@ -2731,9 +2728,9 @@
                    error (1, 0, "%s:%s has bad `special' newphrase %s",
                           finfo->file, rev1, (char *)n->data);
                rev1_dev = dev_long;
-               if (strcmp (ftype, "character") == 0)
+               if (STREQ (ftype, "character"))
                    rev1_mode |= S_IFCHR;
-               else if (strcmp (ftype, "block") == 0)
+               else if (STREQ (ftype, "block"))
                    rev1_mode |= S_IFBLK;
                else
                    error (0, 0, "%s:%s unknown file type `%s'",
@@ -2811,9 +2808,9 @@
                    error (1, 0, "%s:%s has bad `special' newphrase %s",
                           finfo->file, rev2, (char *)n->data);
                rev2_dev = dev_long;
-               if (strcmp (ftype, "character") == 0)
+               if (STREQ (ftype, "character"))
                    rev2_mode |= S_IFCHR;
-               else if (strcmp (ftype, "block") == 0)
+               else if (STREQ (ftype, "block"))
                    rev2_mode |= S_IFBLK;
                else
                    error (0, 0, "%s:%s unknown file type `%s'",
@@ -2847,7 +2844,7 @@
        result = 1;
     }
     else if (rev1_symlink != NULL)
-       result = (strcmp (rev1_symlink, rev2_symlink) == 0);
+       result = STREQ (rev1_symlink, rev2_symlink);
     else
     {
        /* Compare user ownership. */

Index: verify.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/verify.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- verify.c    26 Jun 2006 19:40:51 -0000      1.8
+++ verify.c    12 Sep 2007 17:27:24 -0000      1.9
@@ -513,7 +513,7 @@
     assert (n);
 
     e = n->data;
-    bin = !strcmp (e->options, "-kb");
+    bin = STREQ (e->options, "-kb");
 
     basefn = make_base_file_name (finfo->file, e->version);
     basesigfn = Xasprintf ("%s%s", basefn, ".sig");

Index: vers_ts.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/vers_ts.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -b -r1.70 -r1.71
--- vers_ts.c   12 Sep 2007 02:45:23 -0000      1.70
+++ vers_ts.c   12 Sep 2007 17:27:24 -0000      1.71
@@ -101,7 +101,7 @@
           use the entries line for the sole purpose of telling
           time_stamp_server what is up; we don't want the rest of CVS
           to think there is an entries line.  */
-       if (strcmp (entdata->timestamp, "D") != 0)
+       if (!STREQ (entdata->timestamp, "D"))
 #endif
        {
            vers_ts->vn_user = xstrdup (entdata->version);
@@ -133,17 +133,17 @@
      * options stored in the entries file and default options from the RCS
      * archive, except for binary mode (-kb).
      */
-    if (options && *options != '\0')
+    if (options && *options)
     {
-       if (vers_ts->options != NULL)
+       if (vers_ts->options)
            free (vers_ts->options);
-       if (rcsexpand != NULL && strcmp (rcsexpand, "b") == 0)
+       if (rcsexpand && STREQ (rcsexpand, "b"))
            vers_ts->options = xstrdup ("-kb");
        else
            vers_ts->options = xstrdup (options);
     }
-    else if ((!vers_ts->options || *vers_ts->options == '\0')
-             && rcsexpand != NULL)
+    else if ((!vers_ts->options || !*vers_ts->options)
+             && rcsexpand)
     {
        /* If no keyword expansion was specified on command line,
           use whatever was in the rcs file (if there is one).  This
@@ -200,7 +200,7 @@
            finfo->rcs = rcsdata;
        }
 
-       if (vers_ts->tag && strcmp (vers_ts->tag, TAG_BASE) == 0)
+       if (vers_ts->tag && STREQ (vers_ts->tag, TAG_BASE))
        {
            vers_ts->vn_rcs = xstrdup (vers_ts->vn_user);
            vers_ts->vn_tag = xstrdup (vers_ts->vn_user);

Index: watch.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/watch.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- watch.c     12 Sep 2007 13:07:34 -0000      1.48
+++ watch.c     12 Sep 2007 17:27:24 -0000      1.49
@@ -77,7 +77,7 @@
 
     TRACE( TRACE_FUNCTION, "modify_watchers ( %s )", file );
 
-    if (the_args.user && strcmp (getcaller (), the_args.user) && !is_admin ())
+    if (the_args.user && !STREQ (getcaller (), the_args.user) && !is_admin ())
     {
        error (1, 0,
               "Editing other user's watches is restricted to the %s group.",
@@ -226,7 +226,7 @@
        if (!((curattr_new == NULL && curattr == NULL)
              || (curattr_new != NULL
                  && curattr != NULL
-                 && strcmp (curattr_new, curattr) == 0)))
+                 && STREQ (curattr_new, curattr))))
            fileattr_set (file,
                          "_watchers",
                          curattr_new);
@@ -264,7 +264,7 @@
           matches any of the specified directories. Otherwise, it must be an 
exact
           match. */
        if ( the_args.local )
-           set_default = strcmp( update_dir, the_args.dirs[ dir_check ] )==0;
+           set_default = STREQ (update_dir, the_args.dirs[dir_check]);
        else 
            set_default = strncmp( update_dir, the_args.dirs[ dir_check ], 
strlen( the_args.dirs[ dir_check ] ) ) == 0;
        dir_check++;
@@ -307,19 +307,19 @@
                break;
            case 'a':
                a_omitted = 0;
-               if (strcmp (optarg, "edit") == 0)
+               if (STREQ (optarg, "edit"))
                    the_args.edit = 1;
-               else if (strcmp (optarg, "unedit") == 0)
+               else if (STREQ (optarg, "unedit"))
                    the_args.unedit = 1;
-               else if (strcmp (optarg, "commit") == 0)
+               else if (STREQ (optarg, "commit"))
                    the_args.commit = 1;
-               else if (strcmp (optarg, "all") == 0)
+               else if (STREQ (optarg, "all"))
                {
                    the_args.edit = 1;
                    the_args.unedit = 1;
                    the_args.commit = 1;
                }
-               else if (strcmp (optarg, "none") == 0)
+               else if (STREQ (optarg, "none"))
                {
                    the_args.edit = 0;
                    the_args.unedit = 0;
@@ -444,25 +444,25 @@
 {
     if (argc <= 1)
        usage (watch_usage);
-    if (strcmp (argv[1], "on") == 0)
+    if (STREQ (argv[1], "on"))
     {
        --argc;
        ++argv;
        return watch_on (argc, argv);
     }
-    else if (strcmp (argv[1], "off") == 0)
+    else if (STREQ (argv[1], "off"))
     {
        --argc;
        ++argv;
        return watch_off (argc, argv);
     }
-    else if (strcmp (argv[1], "add") == 0)
+    else if (STREQ (argv[1], "add"))
     {
        --argc;
        ++argv;
        return watch_add (argc, argv);
     }
-    else if (strcmp (argv[1], "remove") == 0)
+    else if (STREQ (argv[1], "remove"))
     {
        --argc;
        ++argv;

Index: wrapper.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/wrapper.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -b -r1.49 -r1.50
--- wrapper.c   27 Aug 2007 02:11:06 -0000      1.49
+++ wrapper.c   12 Sep 2007 17:27:25 -0000      1.50
@@ -445,7 +445,7 @@
        case 'k':
            if (e.rcsOption)
                free (e.rcsOption);
-           e.rcsOption = strcmp (temp, "kv") ? xstrdup (temp) : NULL;
+           e.rcsOption = STREQ (temp, "kv") ? NULL : xstrdup (temp);
            break;
        default:
            break;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]