summaryrefslogtreecommitdiff
path: root/rpmio
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2002-05-16 16:55:21 +0000
committerjbj <devnull@localhost>2002-05-16 16:55:21 +0000
commit076a6e29c5c8a35a5f78ae2a15339d030cfe2fdf (patch)
treec79f91a35a1134d5cd67394c534e804405697d61 /rpmio
parentbc9d22eeb9034966654091306e3e3fc9a9dd7c71 (diff)
downloadlibrpm-tizen-076a6e29c5c8a35a5f78ae2a15339d030cfe2fdf.tar.gz
librpm-tizen-076a6e29c5c8a35a5f78ae2a15339d030cfe2fdf.tar.bz2
librpm-tizen-076a6e29c5c8a35a5f78ae2a15339d030cfe2fdf.zip
- opaque (well mostly) rpmTransactionSet using methods.
CVS patchset: 5437 CVS date: 2002/05/16 16:55:21
Diffstat (limited to 'rpmio')
-rw-r--r--rpmio/Makefile.am3
-rw-r--r--rpmio/macro.c14
2 files changed, 13 insertions, 4 deletions
diff --git a/rpmio/Makefile.am b/rpmio/Makefile.am
index f08144311..68bac6c10 100644
--- a/rpmio/Makefile.am
+++ b/rpmio/Makefile.am
@@ -6,8 +6,7 @@ EXTRA_DIST = tdigest.c tdir.c tficl.c tfts.c tglob.c tinv.c tkey.c trpmio.c
EXTRA_PROGRAMS = tdigest tdir tfts tglob tinv tkey tring trpmio dumpasn1
-INCLUDES = \
- -I$(top_srcdir) \
+INCLUDES = -I. \
-I$(top_srcdir)/beecrypt \
-I$(top_srcdir)/popt \
@INCPATH@
diff --git a/rpmio/macro.c b/rpmio/macro.c
index 03cf51b31..b7d8d9c3a 100644
--- a/rpmio/macro.c
+++ b/rpmio/macro.c
@@ -1,4 +1,3 @@
-/*@-branchstate@*/
/** \ingroup rpmrc rpmio
* \file rpmio/macro.c
*/
@@ -248,11 +247,13 @@ findEntry(MacroContext mc, const char * name, size_t namelen)
if (mc->macroTable == NULL || mc->firstFree == 0)
return NULL;
+/*@-branchstate@*/
if (namelen > 0) {
strncpy(namebuf, name, namelen);
namebuf[namelen] = '\0';
name = namebuf;
}
+/*@=branchstate@*/
key = &keybuf;
memset(key, 0, sizeof(*key));
@@ -763,10 +764,12 @@ pushMacro(/*@out@*/ MacroEntry * mep,
me->body = xstrdup(b ? b : "");
me->used = 0;
me->level = level;
+/*@-branchstate@*/
if (mep)
*mep = me;
else
me = _free(me);
+/*@=branchstate@*/
}
/**
@@ -779,6 +782,7 @@ popMacro(MacroEntry * mep)
{
MacroEntry me = (*mep ? *mep : NULL);
+/*@-branchstate@*/
if (me) {
/* XXX cast to workaround const */
/*@-onlytrans@*/
@@ -789,6 +793,7 @@ popMacro(MacroEntry * mep)
me = _free(me);
/*@=onlytrans@*/
}
+/*@=branchstate@*/
}
/**
@@ -1059,7 +1064,9 @@ doFoo(MacroBuf mb, int negate, const char * f, size_t fn,
b = (rpmIsVerbose() ? buf : NULL);
} else if (STREQ("url2path", f, fn) || STREQ("u2p", f, fn)) {
(void)urlPath(buf, (const char **)&b);
+/*@-branchstate@*/
if (*b == '\0') b = "/";
+/*@=branchstate@*/
} else if (STREQ("uncompress", f, fn)) {
rpmCompressedMagic compressed = COMPRESSED_OTHER;
/*@-globs@*/
@@ -1151,6 +1158,7 @@ expandMacro(MacroBuf mb)
return 1;
}
+/*@-branchstate@*/
while (rc == 0 && mb->nb > 0 && (c = *s) != '\0') {
s++;
/* Copy text until next macro */
@@ -1434,6 +1442,7 @@ expandMacro(MacroBuf mb)
s = se;
}
+/*@=branchstate@*/
*mb->t = '\0';
mb->s = s;
@@ -1930,12 +1939,14 @@ if (_debug) fprintf(stderr, "*** RGP ut %d file %s nurl %d\n", ut, file, nurl);
#endif
}
+/*@-branchstate@*/
if (url && nurl > 0) {
char *t = strncpy(alloca(nurl+1), url, nurl);
t[nurl] = '\0';
url = t;
} else
url = "";
+/*@=branchstate@*/
result = rpmGetPath(url, root, "/", mdir, "/", file, NULL);
@@ -2029,4 +2040,3 @@ main(int argc, char *argv[])
}
#endif /* EVAL_MACROS */
#endif /* DEBUG_MACROS */
-/*@=branchstate@*/