summaryrefslogtreecommitdiff
path: root/build/parseReqs.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-04-29 01:05:43 +0000
committerjbj <devnull@localhost>2001-04-29 01:05:43 +0000
commit3b5820c4205e440d9aad5c5d626721ee30b12292 (patch)
treeb1f0a694903aef1dd937539e1b06c8b0947fb67c /build/parseReqs.c
parent6a0524ed57548de92daa4b6cf8ee9d2ab39d7a42 (diff)
downloadlibrpm-tizen-3b5820c4205e440d9aad5c5d626721ee30b12292.tar.gz
librpm-tizen-3b5820c4205e440d9aad5c5d626721ee30b12292.tar.bz2
librpm-tizen-3b5820c4205e440d9aad5c5d626721ee30b12292.zip
- globalize _free(3) wrapper in rpmlib.h, consistent usage throughout.
- internalize locale insensitive ctype(3) in rpmio.h - boring lclint annotations and fiddles. CVS patchset: 4721 CVS date: 2001/04/29 01:05:43
Diffstat (limited to 'build/parseReqs.c')
-rw-r--r--build/parseReqs.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/build/parseReqs.c b/build/parseReqs.c
index 042f570b5..5e2f1ab1c 100644
--- a/build/parseReqs.c
+++ b/build/parseReqs.c
@@ -11,8 +11,8 @@
/**
*/
static struct ReqComp {
- char *token;
- int sense;
+ const char * token;
+ rpmsenseFlags sense;
} ReqComparisons[] = {
{ "<=", RPMSENSE_LESS | RPMSENSE_EQUAL},
{ "=<", RPMSENSE_LESS | RPMSENSE_EQUAL},
@@ -28,16 +28,16 @@ static struct ReqComp {
{ NULL, 0 },
};
-#define SKIPWHITE(_x) {while(*(_x) && (isspace(*_x) || *(_x) == ',')) (_x)++;}
-#define SKIPNONWHITE(_x){while(*(_x) &&!(isspace(*_x) || *(_x) == ',')) (_x)++;}
+#define SKIPWHITE(_x) {while(*(_x) && (xisspace(*_x) || *(_x) == ',')) (_x)++;}
+#define SKIPNONWHITE(_x){while(*(_x) &&!(xisspace(*_x) || *(_x) == ',')) (_x)++;}
int parseRCPOT(Spec spec, Package pkg, const char *field, int tag,
- int index, int tagflags)
+ int index, rpmsenseFlags tagflags)
{
const char *r, *re, *v, *ve;
- char *req, *version;
+ char * req, * version;
Header h;
- int flags;
+ rpmsenseFlags flags;
switch (tag) {
case RPMTAG_PROVIDEFLAGS:
@@ -95,7 +95,7 @@ int parseRCPOT(Spec spec, Package pkg, const char *field, int tag,
flags = (tagflags & ~RPMSENSE_SENSEMASK);
/* Tokens must begin with alphanumeric, _, or / */
- if (!(isalnum(r[0]) || r[0] == '_' || r[0] == '/')) {
+ if (!(xisalnum(r[0]) || r[0] == '_' || r[0] == '/')) {
rpmError(RPMERR_BADSPEC,
_("line %d: Dependency tokens must begin with alpha-numeric, '_' or '/': %s\n"),
spec->lineNum, spec->line);
@@ -183,8 +183,8 @@ int parseRCPOT(Spec spec, Package pkg, const char *field, int tag,
addReqProv(spec, h, flags, req, version, index);
- if (req) free(req);
- if (version) free(version);
+ req = _free(req);
+ version = _free(version);
}