summaryrefslogtreecommitdiff
path: root/rpmio
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-04-20 19:17:23 +0000
committerjbj <devnull@localhost>1999-04-20 19:17:23 +0000
commit0cf9b0bdfed25fd22c80b32219b33edd61ed05dc (patch)
treee752aa1dd18724add4284914895b28b5ceff0ada /rpmio
parent10b88439eb63852e8a0d5cb1a32724529ee49c61 (diff)
downloadrpm-0cf9b0bdfed25fd22c80b32219b33edd61ed05dc.tar.gz
rpm-0cf9b0bdfed25fd22c80b32219b33edd61ed05dc.tar.bz2
rpm-0cf9b0bdfed25fd22c80b32219b33edd61ed05dc.zip
fix: % before non-alphabetic non-macro special now passed unscathed.
CVS patchset: 3023 CVS date: 1999/04/20 19:17:23
Diffstat (limited to 'rpmio')
-rw-r--r--rpmio/macro.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/rpmio/macro.c b/rpmio/macro.c
index a6e7f310b..0e7d2ea95 100644
--- a/rpmio/macro.c
+++ b/rpmio/macro.c
@@ -10,8 +10,14 @@
#ifdef DEBUG_MACROS
#define rpmError fprintf
#define RPMERR_BADSPEC stderr
+#undef _
#define _(x) x
#define xfree(_p) free((void *)_p)
+typedef int FD_t;
+#define fdFileno(_x) (_x)
+#define fdOpen open
+#define fdRead read
+#define fdClose close
#else
#include "rpmlib.h"
#endif
@@ -902,7 +908,12 @@ expandMacro(MacroBuf *mb)
fn = (fe - f);
gn = (ge - g);
if (fn <= 0) {
+/* XXX Process % in unknown context */
+ c = '%'; /* XXX only need to save % */
+ SAVECHAR(mb, c);
+#if 0
rpmError(RPMERR_BADSPEC, _("A %% is followed by an unparseable macro"));
+#endif
s = se;
continue;
}
@@ -1369,7 +1380,7 @@ rpmGetPath(const char *path, ...)
#ifdef DEBUG_MACROS
MacroContext mc = { NULL, 0, 0};
-char *macrofiles = "./paths:./environment:./macros";
+char *macrofiles = "../macros";
char *testfile = "./test";
int