From e11a0b13ee384e545cc9abcbc84a4c716e380147 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 21 Feb 1996 15:28:47 +0000 Subject: [PATCH] fix %doc %docdir contention CVS patchset: 375 CVS date: 1996/02/21 15:28:47 --- build/pack.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/build/pack.c b/build/pack.c index 445fab9..3a67ccd 100644 --- a/build/pack.c +++ b/build/pack.c @@ -632,16 +632,17 @@ static int process_filelist(Header header, StringBuf sb, int *size, s = strtok(buf, " \t\n"); while (s) { - if (!strcmp(s, "%doc")) { + /* Order of comparison here is important */ + if (!strcmp(s, "%docdir")) { + s = strtok(NULL, " \t\n"); + addDocdir(s); + break; + } else if (!strcmp(s, "%doc")) { isdoc = 1; } else if (!strcmp(s, "%config")) { isconf = 1; } else if (!strcmp(s, "%dir")) { isdir = 1; - } else if (!strcmp(s, "%docdir")) { - s = strtok(NULL, " \t\n"); - addDocdir(s); - break; } else { if (isdoc && (*s != '/')) { /* This is a special %doc macro */ -- 2.7.4