12 more dead strtoks.
authorjbj <devnull@localhost>
Sat, 3 Jul 1999 22:58:08 +0000 (22:58 +0000)
committerjbj <devnull@localhost>
Sat, 3 Jul 1999 22:58:08 +0000 (22:58 +0000)
CVS patchset: 3124
CVS date: 1999/07/03 22:58:08

CHANGES
build/files.c
build/parseChangelog.c
build/rpmbuild.h
po/rpm.pot

diff --git a/CHANGES b/CHANGES
index d2ca225..54a2bae 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -21,6 +21,7 @@
        - fix: --checksig segfault with odd pgp output (e.g. w/o ~/.pgp) (#3720)
        - avoid numeric overflow in version comparison (Thayne Harbaugh<tharbaug@liberate.com>).
        - move url.c and ftp.c to rpmlib right next to query.
+       - 12 more dead strtoks.
 
 3.0 -> 3.0.1
        - fix: %verifyscript resurrected (Shing-Gene Yung).
index b8398aa..82ff9a2 100644 (file)
@@ -12,6 +12,9 @@
 #include "md5.h"
 #include "rpmmacro.h"
 
+#define        SKIPWHITE(_x)   {while(*(_x) && (isspace(*_x) || *(_x) == ',')) (_x)++;}
+#define        SKIPNONWHITE(_x){while(*(_x) &&!(isspace(*_x) || *(_x) == ',')) (_x)++;}
+
 #define MAXDOCDIR 1024
 
 typedef struct {
@@ -242,56 +245,60 @@ VFA_t verifyAttrs[] = {
 
 static int parseForVerify(char *buf, struct FileList *fl)
 {
-    char *p, *q, *start, *end, *name;
-    char ourbuf[BUFSIZ];
-    int not, verifyFlags;
+    char *p, *pe, *q;
+    const char *name;
     int *resultVerify;
+    int not;
+    int verifyFlags;
 
-    if (!(p = start = strstr(buf, "%verify"))) {
-       if (!(p = start = strstr(buf, "%defverify"))) {
-           return 0;
-       }
-       name = "%defverify";
-       resultVerify = &(fl->defVerifyFlags);
-       p += 10;
-    } else {
-       name = "%verify";
+    if ((p = strstr(buf, (name = "%verify"))) != NULL) {
        resultVerify = &(fl->currentVerifyFlags);
-       p += 7;
-    }
+    } else if ((p = strstr(buf, (name = "%defverify"))) != NULL) {
+       resultVerify = &(fl->defVerifyFlags);
+    } else
+       return 0;
+
+    for (pe = p; (pe-p) < strlen(name); pe++)
+       *pe = ' ';
 
-    SKIPSPACE(p);
+    SKIPSPACE(pe);
 
-    if (*p != '(') {
-       rpmError(RPMERR_BADSPEC, _("Bad %s() syntax: %s"), name, buf);
+    if (*pe != '(') {
+       rpmError(RPMERR_BADSPEC, _("Missing '(' in %s %s"), name, pe);
        fl->processingFailed = 1;
        return RPMERR_BADSPEC;
     }
-    p++;
 
-    end = p;
-    while (*end && *end != ')') {
-       end++;
-    }
+    /* Bracket %*verify args */
+    *pe++ = ' ';
+    for (p = pe; *pe && *pe != ')'; pe++)
+       ;
 
-    if (! *end) {
-       rpmError(RPMERR_BADSPEC, _("Bad %s() syntax: %s"), name, buf);
+    if (*pe == '\0') {
+       rpmError(RPMERR_BADSPEC, _("Missing ')' in %s(%s"), name, p);
        fl->processingFailed = 1;
        return RPMERR_BADSPEC;
     }
 
-    strncpy(ourbuf, p, end-p);
-    ourbuf[end-p] = '\0';
-    while (start <= end) {
-       *start++ = ' ';
-    }
+    /* Localize. Erase parsed string */
+    q = alloca((pe-p) + 1);
+    strncpy(q, p, pe-p);
+    q[pe-p] = '\0';
+    while (p <= pe)
+       *p++ = ' ';
 
     not = 0;
     verifyFlags = RPMVERIFY_NONE;
 
-    q = ourbuf;
-    while ((p = strtok(q, ", \n\t")) != NULL) {
-       q = NULL;
+    for (p = q; *p; p = pe) {
+       SKIPWHITE(p);
+       if (*p == '\0')
+           break;
+       pe = p;
+       SKIPNONWHITE(pe);
+       if (*pe)
+           *pe++ = '\0';
+
        {   VFA_t *vfa;
            for (vfa = verifyAttrs; vfa->attribute != NULL; vfa++) {
                if (strcmp(p, vfa->attribute))
@@ -302,6 +309,7 @@ static int parseForVerify(char *buf, struct FileList *fl)
            if (vfa->attribute)
                continue;
        }
+
        if (!strcmp(p, "not")) {
            not ^= 1;
        } else {
@@ -320,74 +328,79 @@ static int parseForVerify(char *buf, struct FileList *fl)
 
 static int parseForAttr(char *buf, struct FileList *fl)
 {
-    char *p, *s, *start, *end, *name;
-    char ourbuf[1024];
-    int x, defattr = 0;
+    char *p, *pe, *q;
+    const char *name;
+    int x;
     AttrRec arbuf, *ar = &arbuf, *ret_ar;
 
-    if (!(p = start = strstr(buf, "%attr"))) {
-       if (!(p = start = strstr(buf, "%defattr"))) {
-           return 0;
-       }
-       defattr = 1;
-       name = "%defattr";
-       ret_ar = &(fl->def_ar);
-       p += 8;
-    } else {
-       name = "%attr";
+    if ((p = strstr(buf, (name = "%attr"))) != NULL) {
        ret_ar = &(fl->cur_ar);
-       p += 5;
-    }
+    } else if ((p = strstr(buf, (name = "%defattr"))) != NULL) {
+       ret_ar = &(fl->def_ar);
+    } else
+       return 0;
 
-    *ar = empty_ar;    /* structure assignment */
+    for (pe = p; (pe-p) < strlen(name); pe++)
+       *pe = ' ';
 
-    SKIPSPACE(p);
+    SKIPSPACE(pe);
 
-    if (*p != '(') {
-       rpmError(RPMERR_BADSPEC, _("Bad %s() syntax: %s"), name, buf);
+    if (*pe != '(') {
+       rpmError(RPMERR_BADSPEC, _("Missing '(' in %s %s"), name, pe);
        fl->processingFailed = 1;
        return RPMERR_BADSPEC;
     }
-    p++;
-
-    end = p;
-    while (*end && *end != ')') {
-       end++;
-    }
 
-    if (! *end) {
-       rpmError(RPMERR_BADSPEC, _("Bad %s() syntax: %s"), name, buf);
-       fl->processingFailed = 1;
-       return RPMERR_BADSPEC;
-    }
+    /* Bracket %*attr args */
+    *pe++ = ' ';
+    for (p = pe; *pe && *pe != ')'; pe++)
+       ;
 
-    if (defattr) {
-       s = end;
-       s++;
-       SKIPSPACE(s);
-       if (*s) {
+    if (ret_ar == &(fl->def_ar)) {     /* %defattr */
+       q = pe;
+       q++;
+       SKIPSPACE(q);
+       if (*q) {
            rpmError(RPMERR_BADSPEC,
-                    _("No files after %%defattr(): %s"), buf);
+                    _("Non-white space follows %s(): %s"), name, q);
            fl->processingFailed = 1;
            return RPMERR_BADSPEC;
        }
     }
 
-    strncpy(ourbuf, p, end-p);
-    ourbuf[end-p] = '\0';
+    /* Localize. Erase parsed string */
+    q = alloca((pe-p) + 1);
+    strncpy(q, p, pe-p);
+    q[pe-p] = '\0';
+    while (p <= pe)
+       *p++ = ' ';
 
-    ar->ar_fmodestr = strtok(ourbuf, ", \n\t");
-    ar->ar_user = strtok(NULL, ", \n\t");
-    ar->ar_group = strtok(NULL, ", \n\t");
+    *ar = empty_ar;    /* structure assignment */
 
-    if (defattr)
-        ar->ar_dmodestr = strtok(NULL, ", \n\t");
-    else
-       ar->ar_dmodestr = NULL;
+    p = q; SKIPWHITE(p);
+    if (*p) {
+       pe = p; SKIPNONWHITE(pe); if (*pe) *pe++ = '\0';
+       ar->ar_fmodestr = p;
+       p = pe; SKIPWHITE(p);
+    }
+    if (*p) {
+       pe = p; SKIPNONWHITE(pe); if (*pe) *pe++ = '\0';
+       ar->ar_user = p;
+       p = pe; SKIPWHITE(p);
+    }
+    if (*p) {
+       pe = p; SKIPNONWHITE(pe); if (*pe) *pe++ = '\0';
+       ar->ar_group = p;
+       p = pe; SKIPWHITE(p);
+    }
+    if (*p && ret_ar == &(fl->def_ar)) {       /* %defattr */
+       pe = p; SKIPNONWHITE(pe); if (*pe) *pe++ = '\0';
+        ar->ar_dmodestr = p;
+       p = pe; SKIPWHITE(p);
+    }
 
-    if (!(ar->ar_fmodestr && ar->ar_user && ar->ar_group) || 
-               strtok(NULL, ", \n\t")) {
-       rpmError(RPMERR_BADSPEC, _("Bad %s() syntax: %s"), name, buf);
+    if (!(ar->ar_fmodestr && ar->ar_user && ar->ar_group) || *p != '\0') {
+       rpmError(RPMERR_BADSPEC, _("Bad syntax: %s(%s)"), name, q);
        fl->processingFailed = 1;
        return RPMERR_BADSPEC;
     }
@@ -397,7 +410,7 @@ static int parseForAttr(char *buf, struct FileList *fl)
        unsigned int ui;
        x = sscanf(ar->ar_fmodestr, "%o", &ui);
        if ((x == 0) || (ar->ar_fmode & ~MYALLPERMS)) {
-           rpmError(RPMERR_BADSPEC, _("Bad %s() mode spec: %s"), name, buf);
+           rpmError(RPMERR_BADSPEC, _("Bad mode spec: %s(%s)"), name, q);
            fl->processingFailed = 1;
            return RPMERR_BADSPEC;
        }
@@ -409,7 +422,7 @@ static int parseForAttr(char *buf, struct FileList *fl)
        unsigned int ui;
        x = sscanf(ar->ar_dmodestr, "%o", &ui);
        if ((x == 0) || (ar->ar_dmode & ~MYALLPERMS)) {
-           rpmError(RPMERR_BADSPEC, _("Bad %s() dirmode spec: %s"), name, buf);
+           rpmError(RPMERR_BADSPEC, _("Bad dirmode spec: %s(%s)"), name, q);
            fl->processingFailed = 1;
            return RPMERR_BADSPEC;
        }
@@ -425,64 +438,60 @@ static int parseForAttr(char *buf, struct FileList *fl)
 
     dupAttrRec(ar, ret_ar);
     
-    /* Set everything we just parsed to blank spaces */
-    while (start <= end) {
-       *start++ = ' ';
-    }
-
     return 0;
 }
 
 static int parseForConfig(char *buf, struct FileList *fl)
 {
-    char *p, *start, *end;
-    char ourbuf[1024];
+    char *p, *pe, *q;
+    const char *name;
 
-    if (!(p = start = strstr(buf, "%config"))) {
+    if ((p = strstr(buf, (name = "%config"))) == NULL)
        return 0;
-    }
-    fl->currentFlags = RPMFILE_CONFIG;
 
-    p += 7;
-    SKIPSPACE(p);
+    fl->currentFlags = RPMFILE_CONFIG;
 
-    if (*p != '(') {
-       while (start < p) {
-           *start++ = ' ';
-       }
+    for (pe = p; (pe-p) < strlen(name); pe++)
+       *pe = ' ';
+    SKIPSPACE(pe);
+    if (*pe != '(')
        return 0;
-    }
-    p++;
 
-    end = p;
-    while (*end && *end != ')') {
-       end++;
-    }
+    /* Bracket %config args */
+    *pe++ = ' ';
+    for (p = pe; *pe && *pe != ')'; pe++)
+       ;
 
-    if (! *end) {
-       rpmError(RPMERR_BADSPEC, _("Bad %%config() syntax: %s"), buf);
+    if (*pe == '\0') {
+       rpmError(RPMERR_BADSPEC, _("Missing ')' in %s(%s"), name, p);
        fl->processingFailed = 1;
        return RPMERR_BADSPEC;
     }
 
-    strncpy(ourbuf, p, end-p);
-    ourbuf[end-p] = '\0';
-    while (start <= end) {
-       *start++ = ' ';
-    }
+    /* Localize. Erase parsed string */
+    q = alloca((pe-p) + 1);
+    strncpy(q, p, pe-p);
+    q[pe-p] = '\0';
+    while (p <= pe)
+       *p++ = ' ';
 
-    p = strtok(ourbuf, ", \n\t");
-    while (p) {
+    for (p = q; *p; p = pe) {
+       SKIPWHITE(p);
+       if (*p == '\0')
+           break;
+       pe = p;
+       SKIPNONWHITE(pe);
+       if (*pe)
+           *pe++ = '\0';
        if (!strcmp(p, "missingok")) {
            fl->currentFlags |= RPMFILE_MISSINGOK;
        } else if (!strcmp(p, "noreplace")) {
            fl->currentFlags |= RPMFILE_NOREPLACE;
        } else {
-           rpmError(RPMERR_BADSPEC, _("Invalid %%config token: %s"), p);
+           rpmError(RPMERR_BADSPEC, _("Invalid %s token: %s"), name, p);
            fl->processingFailed = 1;
            return RPMERR_BADSPEC;
        }
-       p = strtok(NULL, ", \n\t");
     }
 
     return 0;
@@ -490,52 +499,55 @@ static int parseForConfig(char *buf, struct FileList *fl)
 
 static int parseForLang(char *buf, struct FileList *fl)
 {
-    char *p, *pe, *start;
-    char ourbuf[1024];
+    char *p, *pe, *q;
+    const char *name;
 
-  while ((p = start = strstr(buf, "%lang")) != NULL) {
+  while ((p = strstr(buf, (name = "%lang"))) != NULL) {
 
-    p += 5;
-    SKIPSPACE(p);
+    for (pe = p; (pe-p) < strlen(name); pe++)
+       *pe = ' ';
+    SKIPSPACE(pe);
 
-    if (*p != '(') {
-       rpmError(RPMERR_BADSPEC, _("Missing '(' in %s"), start);
+    if (*pe != '(') {
+       rpmError(RPMERR_BADSPEC, _("Missing '(' in %s %s"), name, pe);
        fl->processingFailed = 1;
        return RPMERR_BADSPEC;
     }
 
-    p++;       /* skip ( */
+    /* Bracket %lang args */
+    *pe++ = ' ';
     for (pe = p; *pe && *pe != ')'; pe++)
        ;
+
     if (*pe == '\0') {
-       rpmError(RPMERR_BADSPEC, _("Missing ')' in %s"), start);
+       rpmError(RPMERR_BADSPEC, _("Missing ')' in %s(%s"), name, p);
        fl->processingFailed = 1;
        return RPMERR_BADSPEC;
     }
 
-    /* Excise the next %lang construct */
-    strncpy(ourbuf, p, pe-p);
-    ourbuf[pe-p] = '\0';
-    pe++;      /* skip ) */
-    while (start < pe)
-       *start++ = ' ';
+    /* Localize. Erase parsed string */
+    q = alloca((pe-p) + 1);
+    strncpy(q, p, pe-p);
+    q[pe-p] = '\0';
+    while (p <= pe)
+       *p++ = ' ';
 
     /* Parse multiple arguments from %lang */
-    for (p = ourbuf; *p; p = pe) {
+    for (p = q; *p; p = pe) {
        char *newp;
        size_t np;
        int i;
 
-       SKIPSPACE(p);
-       for (pe = p; *pe && !(isspace(*pe) || *pe == ','); pe++)
-           ;
+       SKIPWHITE(p);
+       pe = p;
+       SKIPNONWHITE(pe);
 
        np = pe - p;
        
        /* Sanity check on locale lengths */
        if (np < 1 || (np == 1 && *p != 'C') || np >= 16) {
            rpmError(RPMERR_BADSPEC, _("Unusual locale length: \"%.*s\" in %%lang(%s)"),
-               np, p, ourbuf);
+               np, p, q);
            fl->processingFailed = 1;
            return RPMERR_BADSPEC;
        }
@@ -545,7 +557,7 @@ static int parseForLang(char *buf, struct FileList *fl)
            if (strncmp(fl->currentLangs[i], p, np))
                continue;
            rpmError(RPMERR_BADSPEC, _("Duplicate locale %.*s in %%lang(%s)"),
-               np, p, ourbuf);
+               np, p, q);
            fl->processingFailed = 1;
            return RPMERR_BADSPEC;
        }
index 276bae5..f712461 100644 (file)
@@ -25,7 +25,7 @@ static void addChangelogEntry(Header h, int time, char *name, char *text)
 static int dateToTimet(const char * datestr, time_t * secs)
 {
     struct tm time;
-    char * chptr, * end, ** idx;
+    char *p, *pe, *q, ** idx;
     char * date = strcpy(alloca(strlen(datestr) + 1), datestr);
     static char * days[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", 
                                NULL };
@@ -35,37 +35,43 @@ static int dateToTimet(const char * datestr, time_t * secs)
     
     memset(&time, 0, sizeof(time));
 
-    end = chptr = date;
+    pe = date;
 
     /* day of week */
-    if ((chptr = strtok(date, " \t\n")) == NULL) return -1;
-    idx = days;
-    while (*idx && strcmp(*idx, chptr)) idx++;
-    if (!*idx) return -1;
+    p = pe; SKIPSPACE(p);
+    if (*p == '\0') return -1;
+    pe = p; SKIPNONSPACE(pe); if (*pe) *pe++ = '\0';
+    for (idx = days; *idx && strcmp(*idx, p); idx++)
+       ;
+    if (*idx == NULL) return -1;
 
     /* month */
-    if ((chptr = strtok(NULL, " \t\n")) == NULL) return -1;
-    idx = months;
-    while (*idx && strcmp(*idx, chptr)) idx++;
-    if (!*idx) return -1;
-
+    p = pe; SKIPSPACE(p);
+    if (*p == '\0') return -1;
+    pe = p; SKIPNONSPACE(pe); if (*pe) *pe++ = '\0';
+    for (idx = months; *idx && strcmp(*idx, p); idx++)
+       ;
+    if (*idx == NULL) return -1;
     time.tm_mon = idx - months;
 
     /* day */
-    if ((chptr = strtok(NULL, " \t\n")) == NULL) return -1;
+    p = pe; SKIPSPACE(p);
+    if (*p == '\0') return -1;
+    pe = p; SKIPNONSPACE(pe); if (*pe) *pe++ = '\0';
 
     /* make this noon so the day is always right (as we make this UTC) */
     time.tm_hour = 12;
 
-    time.tm_mday = strtol(chptr, &end, 10);
-    if (!(end && *end == '\0')) return -1;
+    time.tm_mday = strtol(p, &q, 10);
+    if (!(q && *q == '\0')) return -1;
     if (time.tm_mday < 0 || time.tm_mday > lengths[time.tm_mon]) return -1;
 
     /* year */
-    if ((chptr = strtok(NULL, " \t\n")) == NULL) return -1;
-
-    time.tm_year = strtol(chptr, &end, 10);
-    if (!(end && *end == '\0')) return -1;
+    p = pe; SKIPSPACE(p);
+    if (*p == '\0') return -1;
+    pe = p; SKIPNONSPACE(pe); if (*pe) *pe++ = '\0';
+    time.tm_year = strtol(p, &q, 10);
+    if (!(q && *q == '\0')) return -1;
     if (time.tm_year < 1997 || time.tm_year >= 3000) return -1;
     time.tm_year -= 1900;
 
@@ -98,7 +104,7 @@ static int addChangelog(Header h, StringBuf sb)
 
        /* find end of line */
        date = s;
-       SKIPTONEWLINE(s);
+       while(*s && *s != '\n') s++;
        if (! *s) {
            rpmError(RPMERR_BADSPEC, _("incomplete %%changelog entry"));
            return RPMERR_BADSPEC;
@@ -182,9 +188,8 @@ int parseChangelog(Spec spec)
        freeStringBuf(sb);
        return PART_NONE;
     }
-    if (rc) {
+    if (rc)
        return rc;
-    }
     
     while (! (nextPart = isPart(spec->line))) {
        appendStringBuf(sb, spec->line);
@@ -192,9 +197,8 @@ int parseChangelog(Spec spec)
            nextPart = PART_NONE;
            break;
        }
-       if (rc) {
+       if (rc)
            return rc;
-       }
     }
 
     res = addChangelog(spec->packages->header, sb);
index 480fb05..c5243a5 100644 (file)
@@ -32,7 +32,6 @@
 #define FREE(x) { if (x) free((void *)x); x = NULL; }
 #define SKIPSPACE(s) { while (*(s) && isspace(*(s))) (s)++; }
 #define SKIPNONSPACE(s) { while (*(s) && !isspace(*(s))) (s)++; }
-#define SKIPTONEWLINE(s) { while (*s && *s != '\n') s++; }
 
 #define PART_SUBNAME  0
 #define PART_NAME     1
index 0606cab..9b2694f 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 1999-06-30 17:14-0400\n"
+"POT-Creation-Date: 1999-07-03 18:48-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -311,7 +311,7 @@ msgstr ""
 msgid "installing binary packages\n"
 msgstr ""
 
-#: ../install.c:382 ../lib/query.c:732
+#: ../install.c:382 ../lib/query.c:730
 #, c-format
 msgid "package %s is not installed\n"
 msgstr ""
@@ -1505,178 +1505,170 @@ msgstr ""
 msgid "syntax error in expression"
 msgstr ""
 
-#: ../build/files.c:221
+#: ../build/files.c:224
 #, c-format
 msgid "TIMECHECK failure: %s\n"
 msgstr ""
 
-#: ../build/files.c:266 ../build/files.c:278 ../build/files.c:347
-#: ../build/files.c:359 ../build/files.c:390
+#: ../build/files.c:267 ../build/files.c:349 ../build/files.c:512
 #, c-format
-msgid "Bad %s() syntax: %s"
+msgid "Missing '(' in %s %s"
 msgstr ""
 
-#: ../build/files.c:308
+#: ../build/files.c:278 ../build/files.c:466 ../build/files.c:523
 #, c-format
-msgid "Invalid %s token: %s"
-msgstr ""
-
-#: ../build/files.c:370
-msgid "No files after %%defattr(): %s"
+msgid "Missing ')' in %s(%s"
 msgstr ""
 
-#: ../build/files.c:400
+#: ../build/files.c:316 ../build/files.c:491
 #, c-format
-msgid "Bad %s() mode spec: %s"
+msgid "Invalid %s token: %s"
 msgstr ""
 
-#: ../build/files.c:412
+#: ../build/files.c:365
 #, c-format
-msgid "Bad %s() dirmode spec: %s"
-msgstr ""
-
-#: ../build/files.c:463
-msgid "Bad %%config() syntax: %s"
+msgid "Non-white space follows %s(): %s"
 msgstr ""
 
-#: ../build/files.c:481
-msgid "Invalid %%config token: %s"
+#: ../build/files.c:403
+#, c-format
+msgid "Bad syntax: %s(%s)"
 msgstr ""
 
-#: ../build/files.c:502
+#: ../build/files.c:413
 #, c-format
-msgid "Missing '(' in %s"
+msgid "Bad mode spec: %s(%s)"
 msgstr ""
 
-#: ../build/files.c:511
+#: ../build/files.c:425
 #, c-format
-msgid "Missing ')' in %s"
+msgid "Bad dirmode spec: %s(%s)"
 msgstr ""
 
-#: ../build/files.c:537
+#: ../build/files.c:549
 msgid "Unusual locale length: \"%.*s\" in %%lang(%s)"
 msgstr ""
 
-#: ../build/files.c:547
+#: ../build/files.c:559
 msgid "Duplicate locale %.*s in %%lang(%s)"
 msgstr ""
 
-#: ../build/files.c:639
+#: ../build/files.c:651
 msgid "Hit limit for %%docdir"
 msgstr ""
 
-#: ../build/files.c:645
+#: ../build/files.c:657
 msgid "Only one arg for %%docdir"
 msgstr ""
 
 #. We already got a file -- error
-#: ../build/files.c:670
+#: ../build/files.c:682
 #, c-format
 msgid "Two files on one line: %s"
 msgstr ""
 
-#: ../build/files.c:683
+#: ../build/files.c:695
 #, c-format
 msgid "File must begin with \"/\": %s"
 msgstr ""
 
-#: ../build/files.c:695
+#: ../build/files.c:707
 msgid "Can't mix special %%doc with other forms: %s"
 msgstr ""
 
-#: ../build/files.c:783
+#: ../build/files.c:795
 #, c-format
 msgid "File listed twice: %s"
 msgstr ""
 
-#: ../build/files.c:943
+#: ../build/files.c:955
 #, c-format
 msgid "File doesn't match prefix (%s): %s"
 msgstr ""
 
-#: ../build/files.c:953 ../build/files.c:1090
+#: ../build/files.c:965 ../build/files.c:1102
 #, c-format
 msgid "File not found: %s"
 msgstr ""
 
-#: ../build/files.c:996
+#: ../build/files.c:1008
 #, c-format
 msgid "Bad owner/group: %s\n"
 msgstr ""
 
-#: ../build/files.c:1010
+#: ../build/files.c:1022
 #, c-format
 msgid "File %4d: 0%o %s.%s\t %s\n"
 msgstr ""
 
-#: ../build/files.c:1074
+#: ../build/files.c:1086
 #, c-format
 msgid "File needs leading \"/\": %s"
 msgstr ""
 
-#: ../build/files.c:1131
+#: ../build/files.c:1143
 msgid "Could not open %%files file: %s"
 msgstr ""
 
-#: ../build/files.c:1138 ../build/pack.c:433
+#: ../build/files.c:1150 ../build/pack.c:433
 #, c-format
 msgid "line: %s"
 msgstr ""
 
-#: ../build/files.c:1458 ../build/parsePrep.c:31
+#: ../build/files.c:1470 ../build/parsePrep.c:31
 #, c-format
 msgid "Bad owner/group: %s"
 msgstr ""
 
-#: ../build/files.c:1511
+#: ../build/files.c:1523
 #, c-format
 msgid "Couldn't exec %s"
 msgstr ""
 
-#: ../build/files.c:1515
+#: ../build/files.c:1527
 #, c-format
 msgid "Couldn't fork %s"
 msgstr ""
 
-#: ../build/files.c:1594
+#: ../build/files.c:1606
 #, c-format
 msgid "%s failed"
 msgstr ""
 
-#: ../build/files.c:1598
+#: ../build/files.c:1610
 #, c-format
 msgid "failed to write all data to %s"
 msgstr ""
 
-#: ../build/files.c:1632
+#: ../build/files.c:1644
 msgid "Finding provides...\n"
 msgstr ""
 
-#: ../build/files.c:1639
+#: ../build/files.c:1651
 msgid "Failed to find provides"
 msgstr ""
 
-#: ../build/files.c:1658
+#: ../build/files.c:1670
 msgid "Finding requires...\n"
 msgstr ""
 
-#: ../build/files.c:1665
+#: ../build/files.c:1677
 msgid "Failed to find requires"
 msgstr ""
 
-#: ../build/files.c:1699
+#: ../build/files.c:1711
 msgid "Provides:"
 msgstr ""
 
-#: ../build/files.c:1714
+#: ../build/files.c:1726
 msgid "Prereqs:"
 msgstr ""
 
-#: ../build/files.c:1726
+#: ../build/files.c:1738
 msgid "Requires:"
 msgstr ""
 
-#: ../build/files.c:1750
+#: ../build/files.c:1762
 #, c-format
 msgid "Processing files: %s\n"
 msgstr ""
@@ -1793,27 +1785,27 @@ msgstr ""
 msgid "line %d: second %s"
 msgstr ""
 
-#: ../build/parseChangelog.c:95
+#: ../build/parseChangelog.c:101
 msgid "%%changelog entries must start with *"
 msgstr ""
 
-#: ../build/parseChangelog.c:103
+#: ../build/parseChangelog.c:109
 msgid "incomplete %%changelog entry"
 msgstr ""
 
-#: ../build/parseChangelog.c:118
+#: ../build/parseChangelog.c:124
 msgid "bad date in %%changelog: %s"
 msgstr ""
 
-#: ../build/parseChangelog.c:123
+#: ../build/parseChangelog.c:129
 msgid "%%changelog not in decending chronological order"
 msgstr ""
 
-#: ../build/parseChangelog.c:131 ../build/parseChangelog.c:142
+#: ../build/parseChangelog.c:137 ../build/parseChangelog.c:148
 msgid "missing name in %%changelog"
 msgstr ""
 
-#: ../build/parseChangelog.c:149
+#: ../build/parseChangelog.c:155
 msgid "no description in %%changelog"
 msgstr ""
 
@@ -2187,12 +2179,12 @@ msgstr ""
 msgid "error getting record %s from %s"
 msgstr ""
 
-#: ../lib/dbindex.c:105
+#: ../lib/dbindex.c:104
 #, c-format
 msgid "error storing record %s into %s"
 msgstr ""
 
-#: ../lib/dbindex.c:112
+#: ../lib/dbindex.c:111
 #, c-format
 msgid "error removing record %s into %s"
 msgstr ""
@@ -2494,83 +2486,83 @@ msgstr ""
 msgid "cannot read header at %d for lookup"
 msgstr ""
 
-#: ../lib/macro.c:129
+#: ../lib/macro.c:136
 #, c-format
 msgid "======================== active %d empty %d\n"
 msgstr ""
 
 #. XXX just in case
-#: ../lib/macro.c:218
+#: ../lib/macro.c:225
 #, c-format
 msgid "%3d>%*s(empty)"
 msgstr ""
 
-#: ../lib/macro.c:253
+#: ../lib/macro.c:260
 #, c-format
 msgid "%3d<%*s(empty)\n"
 msgstr ""
 
-#: ../lib/macro.c:426
+#: ../lib/macro.c:433
 msgid "Macro %%%s has unterminated body"
 msgstr ""
 
-#: ../lib/macro.c:452
+#: ../lib/macro.c:459
 msgid "Macro %%%s has illegal name (%%define)"
 msgstr ""
 
-#: ../lib/macro.c:458
+#: ../lib/macro.c:465
 msgid "Macro %%%s has unterminated opts"
 msgstr ""
 
-#: ../lib/macro.c:463
+#: ../lib/macro.c:470
 msgid "Macro %%%s has empty body"
 msgstr ""
 
-#: ../lib/macro.c:468
+#: ../lib/macro.c:475
 msgid "Macro %%%s failed to expand"
 msgstr ""
 
-#: ../lib/macro.c:493
+#: ../lib/macro.c:500
 msgid "Macro %%%s has illegal name (%%undefine)"
 msgstr ""
 
-#: ../lib/macro.c:566
+#: ../lib/macro.c:573
 msgid "Macro %%%s (%s) was not used below level %d"
 msgstr ""
 
-#: ../lib/macro.c:650
+#: ../lib/macro.c:657
 #, c-format
 msgid "Unknown option %c in %s(%s)"
 msgstr ""
 
-#: ../lib/macro.c:825
+#: ../lib/macro.c:832
 #, c-format
 msgid "Recursion depth(%d) greater than max(%d)"
 msgstr ""
 
-#: ../lib/macro.c:881 ../lib/macro.c:897
+#: ../lib/macro.c:888 ../lib/macro.c:904
 #, c-format
 msgid "Unterminated %c: %s"
 msgstr ""
 
-#: ../lib/macro.c:930
+#: ../lib/macro.c:937
 msgid "A %% is followed by an unparseable macro"
 msgstr ""
 
-#: ../lib/macro.c:1053
+#: ../lib/macro.c:1060
 msgid "Macro %%%.*s not found, skipping"
 msgstr ""
 
-#: ../lib/macro.c:1131
+#: ../lib/macro.c:1138
 msgid "Target buffer overflow"
 msgstr ""
 
-#: ../lib/macro.c:1278 ../lib/macro.c:1286
+#: ../lib/macro.c:1285 ../lib/macro.c:1293
 #, c-format
 msgid "File %s: %s"
 msgstr ""
 
-#: ../lib/macro.c:1289
+#: ../lib/macro.c:1296
 #, c-format
 msgid "File %s is smaller than %d bytes"
 msgstr ""
@@ -2805,61 +2797,61 @@ msgstr ""
 msgid "query of specfile %s failed, can't parse\n"
 msgstr ""
 
-#: ../lib/query.c:642
+#: ../lib/query.c:640
 msgid "could not read database record!\n"
 msgstr ""
 
-#: ../lib/query.c:653
+#: ../lib/query.c:651
 #, c-format
 msgid "group %s does not contain any packages\n"
 msgstr ""
 
-#: ../lib/query.c:663
+#: ../lib/query.c:661
 #, c-format
 msgid "no package provides %s\n"
 msgstr ""
 
-#: ../lib/query.c:673
+#: ../lib/query.c:671
 #, c-format
 msgid "no package triggers %s\n"
 msgstr ""
 
-#: ../lib/query.c:683
+#: ../lib/query.c:681
 #, c-format
 msgid "no package requires %s\n"
 msgstr ""
 
-#: ../lib/query.c:698
+#: ../lib/query.c:696
 #, c-format
 msgid "file %s: %s\n"
 msgstr ""
 
-#: ../lib/query.c:701
+#: ../lib/query.c:699
 #, c-format
 msgid "file %s is not owned by any package\n"
 msgstr ""
 
-#: ../lib/query.c:714
+#: ../lib/query.c:712
 #, c-format
 msgid "invalid package number: %s\n"
 msgstr ""
 
-#: ../lib/query.c:717
+#: ../lib/query.c:715
 #, c-format
 msgid "package record number: %d\n"
 msgstr ""
 
-#: ../lib/query.c:720
+#: ../lib/query.c:718
 #, c-format
 msgid "record %d could not be read\n"
 msgstr ""
 
-#: ../lib/query.c:735
+#: ../lib/query.c:733
 #, c-format
 msgid "error looking for package %s\n"
 msgstr ""
 
-#: ../lib/query.c:757
+#: ../lib/query.c:755
 msgid "rpmQuery: rpmdbOpen() failed\n"
 msgstr ""