From 5b9681afee60e3049306b5daa16924011bebed20 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 12 Sep 2011 12:54:48 +0300 Subject: [PATCH] Rename scriptlet flags from RPMSCRIPT_FOO to RPMSCRIPT_FLAG_FOO - No functional changes (and this is still internal-only API), just making more obvious what they are and clearing the RPMSCRIPT_FOO namespace for possible future use for the scriptlet types themselves. --- build/parseScript.c | 4 ++-- lib/rpmscript.c | 4 ++-- lib/rpmscript.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build/parseScript.c b/build/parseScript.c index 45250a1..ed1568d 100644 --- a/build/parseScript.c +++ b/build/parseScript.c @@ -267,8 +267,8 @@ int parseScript(rpmSpec spec, int parsePart) goto exit; } - scriptFlags |= expand ? RPMSCRIPT_EXPAND : 0; - scriptFlags |= qformat ? RPMSCRIPT_QFORMAT : 0; + scriptFlags |= expand ? RPMSCRIPT_FLAG_EXPAND : 0; + scriptFlags |= qformat ? RPMSCRIPT_FLAG_QFORMAT : 0; sb = newStringBuf(); if ((rc = readLine(spec, STRIP_NOTHING)) > 0) { diff --git a/lib/rpmscript.c b/lib/rpmscript.c index 9ab2c7d..66ab944 100644 --- a/lib/rpmscript.c +++ b/lib/rpmscript.c @@ -382,12 +382,12 @@ static rpmScript rpmScriptNew(Header h, rpmTagVal tag, const char *body, rasprintf(&script->descr, "%s(%s)", tag2sln(tag), nevra); /* macros need to be expanded before possible queryformat */ - if (script->body && (flags & RPMSCRIPT_EXPAND)) { + if (script->body && (flags & RPMSCRIPT_FLAG_EXPAND)) { char *body = rpmExpand(script->body, NULL); free(script->body); script->body = body; } - if (script->body && (flags & RPMSCRIPT_QFORMAT)) { + if (script->body && (flags & RPMSCRIPT_FLAG_QFORMAT)) { /* XXX TODO: handle queryformat errors */ char *body = headerFormat(h, script->body, NULL); free(script->body); diff --git a/lib/rpmscript.h b/lib/rpmscript.h index 1d87b0d..7d584bc 100644 --- a/lib/rpmscript.h +++ b/lib/rpmscript.h @@ -5,9 +5,9 @@ #include enum rpmscriptFlags_e { - RPMSCRIPT_NONE = 0, - RPMSCRIPT_EXPAND = (1 << 0), /* macro expansion */ - RPMSCRIPT_QFORMAT = (1 << 1), /* header queryformat expansion */ + RPMSCRIPT_FLAG_NONE = 0, + RPMSCRIPT_FLAG_EXPAND = (1 << 0), /* macro expansion */ + RPMSCRIPT_FLAG_QFORMAT = (1 << 1), /* header queryformat expansion */ }; typedef rpmFlags rpmscriptFlags; -- 2.7.4