Rename scriptlet flags from RPMSCRIPT_FOO to RPMSCRIPT_FLAG_FOO
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 12 Sep 2011 09:54:48 +0000 (12:54 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 12 Sep 2011 09:57:23 +0000 (12:57 +0300)
- 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
lib/rpmscript.c
lib/rpmscript.h

index 45250a1..ed1568d 100644 (file)
@@ -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) {
index 9ab2c7d..66ab944 100644 (file)
@@ -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);
index 1d87b0d..7d584bc 100644 (file)
@@ -5,9 +5,9 @@
 #include <rpm/argv.h>
 
 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;