Sanity.
authorjbj <devnull@localhost>
Sun, 12 Nov 2000 10:02:54 +0000 (10:02 +0000)
committerjbj <devnull@localhost>
Sun, 12 Nov 2000 10:02:54 +0000 (10:02 +0000)
CVS patchset: 4257
CVS date: 2000/11/12 10:02:54

build/files.c
build/parseSpec.c
lib/rpmlib.h
lib/rpmlibprov.c

index f2402f9..424f5c2 100644 (file)
@@ -1411,7 +1411,7 @@ void initSourceHeader(Spec spec)
 {
     HeaderIterator hi;
     int tag, type, count;
-    void * ptr;
+    const void * ptr;
 
     spec->sourceHeader = headerNew();
     /* Only specific tags are added to the source package header */
index f9791d0..d0a1da4 100644 (file)
@@ -414,7 +414,7 @@ fprintf(stderr, "*** PS buildRootURL(%s) %p macro set to %s\n", spec->buildRootU
     
     while (parsePart != PART_NONE) {
        switch (parsePart) {
-         case PART_PREAMBLE:
+        case PART_PREAMBLE:
            parsePart = parsePreamble(spec, initialPackage);
            initialPackage = 0;
            break;
@@ -448,6 +448,9 @@ fprintf(stderr, "*** PS buildRootURL(%s) %p macro set to %s\n", spec->buildRootU
            parsePart = parseFiles(spec);
            break;
 
+         case PART_NONE:               /* XXX avoid gcc whining */
+         case PART_BUILDARCHITECTURES:
+           break;
        }
 
        if (parsePart < 0) {
index 8041df5..29b06c2 100644 (file)
@@ -137,7 +137,10 @@ extern const struct headerSprintfExtension rpmHeaderFormats[];
  */
 typedef enum rpmTag_e {
 
-    RPMTAG_HEADERIMAGE         = HEADER_IMAGE, /*!< Header allocated image. */
+    RPMTAG_HEADERIMAGE         = HEADER_IMAGE,         /*!< Current image. */
+    RPMTAG_HEADERSIGNATURES    = HEADER_SIGNATURES,    /*!< Signatures. */
+    RPMTAG_HEADERIMMUTABLE     = HEADER_IMMUTABLE,     /*!< Original image. */
+    RPMTAG_HEADERREGIONS       = HEADER_REGIONS,       /*!< Regions. */
 
     RPMTAG_HEADERI18NTABLE     = HEADER_I18NTABLE, /*!< I18N string locales. */
 
@@ -915,8 +918,8 @@ typedef enum rpmtransFlags_e {
  * @retval             address of array of rpmlib internal provide versions
  * @return             no. of entries
  */
-int rpmGetRpmlibProvides(/*@out@*/ const char ***provNames,
-       /*@out@*/ int **provFlags, /*@out@*/ const char ***provVersions)
+int rpmGetRpmlibProvides(/*@out@*/ const char *** provNames,
+       /*@out@*/ int ** provFlags, /*@out@*/ const char *** provVersions)
                /*@ modifies *provNames, *provFlags, *provVersions @*/;
 
 /** \ingroup rpmtrans
@@ -1386,11 +1389,11 @@ typedef enum rpmVerifySignatureReturn_e {
  * @param sigTag       type of signature
  * @param sig          signature itself
  * @param count                no. of bytes in signature
- * @param result       detailed text result of signature verification
+ * @retval result      detailed text result of signature verification
  * @return             result of signature verification
  */
 rpmVerifySignatureReturn rpmVerifySignature(const char *file,
-               int_32 sigTag, void *sig, int count, char *result);
+               int_32 sigTag, const void * sig, int count, char *result);
 
 /** \ingroup signature
  * Destroy signature header from package.
index e036df2..ca5a718 100644 (file)
@@ -53,30 +53,29 @@ int rpmCheckRpmlibProvides(const char * keyName, const char * keyEVR,
     return rc;
 }
 
-int rpmGetRpmlibProvides(const char ***provNames, int **provFlags,
-                         const char ***provVersions)
+int rpmGetRpmlibProvides(const char *** provNames, int ** provFlags,
+                         const char *** provVersions)
 {
-    char **names, **versions;
-    int *flags;
+    const char ** names, ** versions;
+    int * flags;
     int n = 0;
     
-    while (rpmlibProvides[n++].featureName != NULL)
-        ;
+    while (rpmlibProvides[n].featureName != NULL)
+        n++;
 
-    names = xmalloc(sizeof(*names) * n);
-    versions = xmalloc(sizeof(*versions) * n);
-    flags = xmalloc(sizeof(*flags) * n);
+    names = xmalloc(sizeof(*names) * (n+1));
+    versions = xmalloc(sizeof(*versions) * (n+1));
+    flags = xmalloc(sizeof(*flags) * (n+1));
     
-    n = 0;
-    while (rpmlibProvides[n].featureName != NULL) {
+    for (n = 0; rpmlibProvides[n].featureName != NULL; n++) {
         names[n] = rpmlibProvides[n].featureName;
         flags[n] = rpmlibProvides[n].featureFlags;
         versions[n] = rpmlibProvides[n].featureEVR;
-        n++;
     }
     
     names[n] = NULL;
     versions[n] = NULL;
+    flags[n] = -1;
     
     *provNames = names;
     *provFlags = flags;