Doxygen annotations.
authorjbj <devnull@localhost>
Mon, 28 Aug 2000 01:08:57 +0000 (01:08 +0000)
committerjbj <devnull@localhost>
Mon, 28 Aug 2000 01:08:57 +0000 (01:08 +0000)
CVS patchset: 4138
CVS date: 2000/08/28 01:08:57

lib/cpio.c
lib/cpio.h
lib/header.c
lib/header.h
lib/rpmlead.c
lib/rpmlead.h
lib/rpmlib.h
lib/signature.c
lib/signature.h
po/rpm.pot
rpmio/rpmio_internal.h

index 417d630..a177689 100644 (file)
@@ -32,11 +32,16 @@ struct hardLink {
     const struct stat sb;
 };
 
-enum hardLinkType { HARDLINK_INSTALL=1, HARDLINK_BUILD };
+/** \ingroup payload
+ */
+enum hardLinkType {
+       HARDLINK_INSTALL=1,
+       HARDLINK_BUILD
+};
 
 /** \ingroup payload
  * Cpio archive header information.
- * @todo add support for tar (soon) and ar (eventually) archive formats.
+ * @todo Add support for tar (soon) and ar (eventually) archive formats.
  */
 struct cpioCrcPhysicalHeader {
     char magic[6];
@@ -55,7 +60,7 @@ struct cpioCrcPhysicalHeader {
     char checksum[8];                  /* ignored !! */
 };
 
-#define        PHYS_HDR_SIZE   110             /* don't depend on sizeof(struct) */
+#define        PHYS_HDR_SIZE   110             /*!< Don't depend on sizeof(struct) */
 
 /** \ingroup payload
  * File name and stat information.
index 887a225..5e6f7b3 100644 (file)
@@ -5,8 +5,7 @@
  * \file lib/cpio.h
  *  Structures used to handle cpio payloads within rpm packages.
  *
- *  Warning: Don't think that rpm's cpio implementation behaves just like
- *  standard cpio.
+ *  @warning Rpm's cpio implementation may be different than standard cpio.
  *  The implementation is pretty close, but it has some behaviors which are
  *  more to RPM's liking. I tried to document the differing behavior in cpio.c,
  *  but I may have missed some (ewt).
index a7cb09c..7b59918 100644 (file)
 
 static unsigned char header_magic[4] = { 0x8e, 0xad, 0xe8, 0x01 };
 
-/* handy -- this tells us alignments for defined elements as well */
+/** \ingroup header
+ * Alignment needs (and sizeof scalars types) for internal rpm data types.
+ */
 static int typeSizes[] =  { 
-       /* RPM_NULL_TYPE */             -1,
-       /* RPM_CHAR_TYPE */             1,
-       /* RPM_INT8_TYPE */             1,
-       /* RPM_INT16_TYPE */            2,
-       /* RPM_INT32_TYPE */            4,
-       /* RPM_INT64_TYPE */            -1,
-       /* RPM_STRING_TYPE */           -1,
-       /* RPM_BIN_TYPE */              1,
-       /* RPM_STRING_ARRAY_TYPE */     -1,
-       /* RPM_I18NSTRING_TYPE */       -1
-};
-
-struct headerToken {
-    struct indexEntry *index;
-    int indexUsed;
-    int indexAlloced;
-
-    int sorted;  
-/*@refs@*/ int usageCount;
+       -1,     /*!< RPM_NULL_TYPE */
+       1,      /*!< RPM_CHAR_TYPE */
+       1,      /*!< RPM_INT8_TYPE */
+       2,      /*!< RPM_INT16_TYPE */
+       4,      /*!< RPM_INT32_TYPE */
+       -1,     /*!< RPM_INT64_TYPE */
+       -1,     /*!< RPM_STRING_TYPE */
+       1,      /*!< RPM_BIN_TYPE */
+       -1,     /*!< RPM_STRING_ARRAY_TYPE */
+       -1      /*!< RPM_I18NSTRING_TYPE */
 };
 
+/**
+ * Description of tag data.
+ */
 struct entryInfo {
-    int_32 tag;
-    int_32 type;
-    int_32 offset;             /* Offset from beginning of data segment,
-                                  only defined on disk */
-    int_32 count;
+    int_32 tag;                        /*!< Tag identifier. */
+    int_32 type;               /*!< Tag data type. */
+    int_32 offset;             /*!< Offset into data segment (ondisk only). */
+    int_32 count;              /*!< Number of tag elements. */
 };
 
+/**
+ * A single tag from a Header.
+ */
 struct indexEntry {
-    struct entryInfo info;
-/*@owned@*/ void * data; 
-    int length;                        /* Computable, but why bother? */
+    struct entryInfo info;     /*!< Description of tag data. */
+/*@owned@*/ void * data;       /*!< Location of tag data. */
+    int length;                        /*!< Computable, but why bother? */
 };
 
+/**
+ * The Header data structure.
+ */
+struct headerToken {
+    struct indexEntry *index;  /*!< Array of tags. */
+    int indexUsed;             /*!< Current size of tag array. */
+    int indexAlloced;          /*!< Allocated size of tag array. */
+    int sorted;                /*!< Header is sorted by tag value? */
+/*@refs@*/ int usageCount;     /*!< Reference count. */
+};
+
+/**
+ */
 struct sprintfTag {
     /* if NULL tag element is invalid */
     headerTagTagFunction ext;   
@@ -79,6 +90,8 @@ struct sprintfTag {
     int pad;
 };
 
+/**
+ */
 struct extensionCache {
     int_32 type;
     int_32 count;
@@ -87,8 +100,16 @@ struct extensionCache {
 /*@owned@*/ const void * data;
 };
 
+/**
+ */
 struct sprintfToken {
-    enum { PTOK_NONE = 0, PTOK_TAG, PTOK_ARRAY, PTOK_STRING, PTOK_COND } type;
+    enum {
+       PTOK_NONE = 0,
+       PTOK_TAG,
+       PTOK_ARRAY,
+       PTOK_STRING,
+       PTOK_COND
+    } type;
     union {
        struct {
            /*@only@*/ struct sprintfToken * format;
@@ -267,9 +288,12 @@ static int dataLength(int_32 type, const void * p, int_32 count, int onDisk)
 /*                                                                  */
 /********************************************************************/
 
+/**
+ * Header tag iterator data structure.
+ */
 struct headerIteratorS {
-    Header h;
-    int next_index;
+    Header h;          /*!< Header being iterated. */
+    int next_index;    /*!< Next tag index. */
 };
 
 HeaderIterator headerInitIterator(Header h)
@@ -330,11 +354,6 @@ Header headerCopy(Header h)
     HeaderIterator headerIter;
     Header res = headerNew();
    
-#if 0  /* XXX harmless, but headerInitIterator() does this anyways */
-    /* Sort the index -- not really necessary but some old apps may depend
-       on this and it certainly won't hurt anything */
-    headerSort(h);
-#endif
     headerIter = headerInitIterator(h);
 
     while (headerNextIterator(headerIter, &tag, &type, &ptr, &count)) {
@@ -520,7 +539,7 @@ void *headerUnload(Header h)
 /*                                                                  */
 /********************************************************************/
 
-int headerWrite(FD_t fd, Header h, int magicp)
+int headerWrite(FD_t fd, Header h, enum hMagic magicp)
 {
     void * p;
     int length;
@@ -553,7 +572,7 @@ int headerWrite(FD_t fd, Header h, int magicp)
     return 0;
 }
 
-Header headerRead(FD_t fd, int magicp)
+Header headerRead(FD_t fd, enum hMagic magicp)
 {
     int_32 block[40];
     int_32 reserved;
@@ -999,7 +1018,7 @@ int headerUsageCount(Header h)
     return h->usageCount;
 }
 
-unsigned int headerSizeof(Header h, int magicp)
+unsigned int headerSizeof(Header h, enum hMagic magicp)
 {
     unsigned int size;
     int i, diff;
index 029e1ff..7d03bd9 100644 (file)
@@ -38,7 +38,12 @@ typedef unsigned int uint_32;
 typedef unsigned short uint_16;
 #endif
 
+/** !ingroup header
+ */
 typedef /*@abstract@*/ /*@refcounted@*/ struct headerToken *Header;
+
+/** !ingroup header
+ */
 typedef /*@abstract@*/ struct headerIteratorS *HeaderIterator;
 
 /** \ingroup header
@@ -107,35 +112,45 @@ struct headerSprintfExtension {
 extern const struct headerSprintfExtension headerDefaultFormats[];
 
 /** \ingroup header
+ * Include calculation for 8 bytes of (magic, 0)?
+ */
+enum hMagic {
+       HEADER_MAGIC_NO         = 0,
+       HEADER_MAGIC_YES        = 1
+};
+
+/** \ingroup header
  * Read (and load) header from file handle.
  * @param fd           file handle
- * @param magicp
- * @return             header
+ * @param magicp       read (and verify) 8 bytes of (magic, 0)?
+ * @return             header (or NULL on error)
  */
-Header headerRead(FD_t fd, int magicp) /*@modifies fd @*/;
+Header headerRead(FD_t fd, enum hMagic magicp)
+       /*@modifies fd @*/;
 
 /** \ingroup header
  * Write (with unload) header to file handle.
  * @param fd           file handle
  * @param h            header
- * @param magicp
- * @return
+ * @param magicp       prefix write with 8 bytes of (magic, 0)?
+ * @return             0 on success, 1 on error
  */
-int headerWrite(FD_t fd, Header h, int magicp) /*@modifies fd, h @*/;
+int headerWrite(FD_t fd, Header h, enum hMagic magicp)
+       /*@modifies fd, h @*/;
 
 /** \ingroup header
  * Return size of on-disk header representation in bytes.
+ * @param h            header
+ * @param magicp       include size of 8 bytes for (magic, 0)?
+ * @return             size of on-disk header
  */
-unsigned int headerSizeof(Header h, int magicp)
+unsigned int headerSizeof(Header h, enum hMagic magicp)
        /*@modifies h @*/;
 
-#define HEADER_MAGIC_NO   0
-#define HEADER_MAGIC_YES  1
-
 /** \ingroup header
  * Convert header to in-memory representation.
  * @param p            on-disk header (with offsets)
- * @return             header (with pointers)
+ * @return             header
  */
 Header headerLoad(void *p)     /*@*/;
 
@@ -234,23 +249,24 @@ int headerModifyEntry(Header h, int_32 tag, int_32 type, void *p, int_32 c)
 
 /** \ingroup header
  * Return array of locales found in header.
+ * The array is terminated with a NULL sentinel.
  * @param h            header
- * @return             array of locales
+ * @return             array of locales (or NULL on error)
  */
 char ** headerGetLangs(Header h)
        /*@modifies h @*/;
 
 /** \ingroup header
  * Add locale specific tag to header.
- * A NULL lang is interpreted as the C locale.  Here are the rules:
- *
- *     1) If the tag isn't in the Header, it's added with the passed string
+ * A NULL lang is interpreted as the C locale. Here are the rules:
+ * \verbatim
+ *     - If the tag isn't in the Header, it's added with the passed string
  *        as a version.
- *     2) If the tag occurs multiple times in entry, which tag is affected
+ *     - If the tag occurs multiple times in entry, which tag is affected
  *        by the operation is undefined.
- *     2) If the tag is in the header w/ this language, the entry is
+ *     - If the tag is in the header w/ this language, the entry is
  *        *replaced* (like headerModifyEntry()).
- *
+ * \endverbatim
  * This function is intended to just "do the right thing". If you need
  * more fine grained control use headerAddEntry() and headerModifyEntry().
  *
@@ -345,6 +361,7 @@ int headerGetRawEntry(Header h, int_32 tag, /*@out@*/ int_32 *type,
 /** \ingroup header
  * Check if tag is in header.
  * @param h            header
+ * @param tag          tag
  * @return             1 on success, 0 on failure
  */
 int headerIsEntry(Header h, int_32 tag)
@@ -356,6 +373,7 @@ int headerIsEntry(Header h, int_32 tag)
  * found.
  *
  * @param h            header
+ * @param tag          tag
  * @return             0 on success, 1 on failure (INCONSISTENT)
  */
 int headerRemoveEntry(Header h, int_32 tag)
@@ -416,16 +434,20 @@ void headerCopyTags(Header headerFrom, Header headerTo, int_32 *tagstocopy)
 /* Entry Types */
 
 #define        RPM_MIN_TYPE            0
-#define RPM_NULL_TYPE          0
-#define RPM_CHAR_TYPE          1
-#define RPM_INT8_TYPE          2
-#define RPM_INT16_TYPE         3
-#define RPM_INT32_TYPE         4
-/* #define RPM_INT64_TYPE      5   ---- These aren't supported (yet) */
-#define RPM_STRING_TYPE                6
-#define RPM_BIN_TYPE           7
-#define RPM_STRING_ARRAY_TYPE  8
-#define RPM_I18NSTRING_TYPE    9
+
+enum tagTypes {
+       RPM_NULL_TYPE           = 0,
+       RPM_CHAR_TYPE           = 1,
+       RPM_INT8_TYPE           = 2,
+       RPM_INT16_TYPE          = 3,
+       RPM_INT32_TYPE          = 4,
+/*     RPM_INT64_TYPE  = 5,   ---- These aren't supported (yet) */
+       RPM_STRING_TYPE         = 6,
+       RPM_BIN_TYPE            = 7,
+       RPM_STRING_ARRAY_TYPE   = 8,
+       RPM_I18NSTRING_TYPE     = 9
+};
+
 #define        RPM_MAX_TYPE            9
 
 /* Tags -- general use tags should start at 1000 (RPM's tag space starts
index e80f9d4..89154b1 100644 (file)
@@ -63,4 +63,3 @@ int readLead(FD_t fd, struct rpmlead *lead)
 
     return 0;
 }
-
index bc41727..c04312e 100644 (file)
@@ -1,20 +1,33 @@
 #ifndef _H_RPMLEAD
 #define _H_RPMLEAD
 
-/** \file lib/rpmlead.h
+/** \ingroup lead
+ * \file lib/rpmlead.h
  *
  */
 
 #include <rpmlib.h>
 
-/* Other definitions went to rpmlib.h */
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+/** \ingroup lead
+ * Write lead to file handle.
+ * @param fd           file handle
+ * @param lead         data address
+ * @return             0 on success, 1 on error
+ */
 int writeLead(FD_t fd, struct rpmlead *lead);
-int readLead(FD_t fd, /*@out@*/struct rpmlead *lead);
+
+/** \ingroup lead
+ * Read lead from file handle.
+ * @param fd           file handle
+ * @retval lead                data address
+ * @return             0 on success, 1 on error
+ */
+int readLead(FD_t fd, /*@out@*/ struct rpmlead *lead)
+       /*@modifies fd, *lead @*/;
 
 #ifdef __cplusplus
 }
index 0bde6f7..86851c8 100644 (file)
@@ -361,6 +361,7 @@ void rpmSetVar(int var, const char *val);
 
 /** \ingroup rpmrc
  * Build and install arch/os table identifiers.
+ * @todo Eliminate.
  */
 enum rpm_machtable_e {
        RPM_MACHTABLE_INSTARCH          = 0,
@@ -387,6 +388,7 @@ int rpmReadRC(const char * file);
 
 /** \ingroup rpmrc
  * Return current arch name and/or number.
+ * @todo Generalize to extract arch component from target_platform macro.
  * @retval name                address of arch name (or NULL)
  * @retval num         address of arch number (or NULL)
  */
@@ -394,6 +396,7 @@ void rpmGetArchInfo( /*@out@*/ const char ** name, /*@out@*/ int * num);
 
 /** \ingroup rpmrc
  * Return current os name and/or number.
+ * @todo Generalize to extract os component from target_platform macro.
  * @retval name                address of os name (or NULL)
  * @retval num         address of os number (or NULL)
  */
@@ -406,6 +409,7 @@ void rpmGetOsInfo( /*@out@*/ const char ** name, /*@out@*/ int * num);
  * on an i686 platform is (usually) 1. The arch score is used to select
  * one of several otherwise identical packages based on the arch/os hints
  * in the header of the intended platform.
+ * @todo Rewrite to use RE's against config.guess target platform output.
  *
  * @param type         any of the RPM_MACHTABLE_* constants
  * @param name         name
@@ -421,6 +425,7 @@ int rpmMachineScore(int type, const char * name);
 int rpmShowRC(FILE *f);
 
 /** \ingroup rpmrc
+ * @todo Eliminate, use _target_* macros.
  * @param archTable
  * @param osTable
  */
@@ -430,6 +435,7 @@ void rpmSetTables(int archTable, int osTable);  /* only used by build code */
  * Set current arch/os names.
  * NULL as argument is set to the default value (munged uname())
  * pushed through a translation table (if appropriate).
+ * @todo Eliminate, use _target_* macros.
  *
  * @param arch         arch name (or NULL)
  * @param os           os name (or NULL)
@@ -438,6 +444,7 @@ void rpmSetMachine(const char * arch, const char * os);
 
 /** \ingroup rpmrc
  * Return current arch/os names.
+ * @todo Eliminate, use _target_* macros.
  * @retval arch                address of arch name (or NULL)
  * @retval os          address of os name (or NULL)
  */
@@ -452,7 +459,12 @@ void rpmFreeRpmrc(void);
 /* ==================================================================== */
 /** \name RPMDB */
 /*@{*/
+/** \ingroup rpmdb
+ */
 typedef /*@abstract@*/ struct rpmdb_s * rpmdb;
+
+/** \ingroup rpmdb
+ */
 typedef /*@abstract@*/ struct _dbiIndexSet * dbiIndexSet;
 
 /** \ingroup rpmdb
index fa53e5a..1a4c716 100644 (file)
@@ -119,10 +119,6 @@ static int checkSize(FD_t fd, int size, int sigsize)
     }
 }
 
-/* rpmReadSignature() emulates the new style signatures if it finds an */
-/* old-style one.  It also immediately verifies the header+archive  */
-/* size and returns an error if it doesn't match.                   */
-
 int rpmReadSignature(FD_t fd, Header *headerp, short sig_type)
 {
     unsigned char buf[2048];
index 40f6d65..1a01d10 100644 (file)
@@ -1,7 +1,8 @@
 #ifndef H_SIGNATURE
 #define        H_SIGNATURE
 
-/** \file lib/signature.h
+/** \ingroup signature
+ * \file lib/signature.h
  * Generate and verify signatures.
  */
 
@@ -31,19 +32,33 @@ extern "C" {
 
 #define RPMSIG_HEADERSIG    5  /* New Header style signature */
 
-/**************************************************/
-/*                                                */
-/* Prototypes                                     */
-/*                                                */
-/**************************************************/
-
+/** \ingroup signature
+ * Return new, empty (signature) header instance.
+ * @return             new
+ */
 Header rpmNewSignature(void);
 
-/* If an old-style signature is found, we emulate a new style one */
+/** \ingroup signature
+ * Read (and verify header+archive size) signature header.
+ * If an old-style signature is found, we emulate a new style one.
+ * @param fd           file handle
+ * @retval header      address of (signature) header
+ * @param sig_type     type of signature header to read (from lead).
+ * @return             0 on success, 1 on error
+ */
 int rpmReadSignature(FD_t fd, /*@out@*/ Header *header, short sig_type);
+
+/** \ingroup signature
+ * Write signature header.
+ * @param fd           file handle
+ * @param header       (signature) header
+ * @return             0 on success, 1 on error
+ */
 int rpmWriteSignature(FD_t fd, Header header);
 
-/* Generate a signature of data in file, insert in header */
+/** \ingroup signature
+ *  Generate a signature of data in file, insert in header.
+ */
 int rpmAddSignature(Header header, const char *file,
                    int_32 sigTag, const char *passPhrase);
 
@@ -54,18 +69,30 @@ int rpmAddSignature(Header header, const char *file,
 #define RPMLOOKUPSIG_DISABLE   1       /* Disable (--sign was not given) */
 #define RPMLOOKUPSIG_ENABLE    2       /* Re-enable %_signature          */
 
-/* Return type of signature in effect for building */
+/** \ingroup signature
+ * Return type of signature in effect for building.
+ */
 int rpmLookupSignatureType(int action);
 
-/* Utility to read a pass phrase from the user */
+/** \ingroup signature
+ *  Read a pass phrase from the user.
+ */
 char *rpmGetPassPhrase(const char *prompt, const int sigTag);
 
-/* >0 is a valid PGP version */
+/** \ingroup signature
+ * Identify PGP versions.
+ * @note Greater than 0 is a valid PGP version.
+ */
 typedef enum pgpVersion_e {
-       PGP_NOTDETECTED = -1, PGP_UNKNOWN = 0, PGP_2 = 2, PGP_5 = 5
+       PGP_NOTDETECTED = -1,
+       PGP_UNKNOWN = 0,
+       PGP_2 = 2,
+       PGP_5 = 5
 } pgpVersion;
 
-/* Return path to pgp executable of given type, or NULL when not found */
+/** \ingroup signature
+ *  Return path to pgp executable of given type, or NULL when not found.
+ */
 const char *rpmDetectPGPVersion( /*@out@*/ pgpVersion *pgpVersion);
 
 #ifdef __cplusplus
index 64b9be5..c554e46 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2000-08-27 17:01-0400\n"
+"POT-Creation-Date: 2000-08-27 20:56-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -2123,51 +2123,51 @@ msgstr ""
 msgid "line %d: Bad %s number: %s\n"
 msgstr ""
 
-#: lib/cpio.c:378
+#: lib/cpio.c:384
 #, c-format
 msgid "can't rename %s to %s: %s\n"
 msgstr ""
 
-#: lib/cpio.c:384
+#: lib/cpio.c:390
 #, c-format
 msgid "can't unlink %s: %s\n"
 msgstr ""
 
-#: lib/cpio.c:632
+#: lib/cpio.c:638
 #, c-format
 msgid "getNextHeader: %s\n"
 msgstr ""
 
-#: lib/cpio.c:1093
+#: lib/cpio.c:1099
 #, c-format
 msgid "(error 0x%x)"
 msgstr ""
 
-#: lib/cpio.c:1096
+#: lib/cpio.c:1102
 msgid "Bad magic"
 msgstr ""
 
-#: lib/cpio.c:1097
+#: lib/cpio.c:1103
 msgid "Bad/unreadable  header"
 msgstr ""
 
-#: lib/cpio.c:1115
+#: lib/cpio.c:1121
 msgid "Header size too big"
 msgstr ""
 
-#: lib/cpio.c:1116
+#: lib/cpio.c:1122
 msgid "Unknown file type"
 msgstr ""
 
-#: lib/cpio.c:1117
+#: lib/cpio.c:1123
 msgid "Missing hard link"
 msgstr ""
 
-#: lib/cpio.c:1118
+#: lib/cpio.c:1124
 msgid "Internal error"
 msgstr ""
 
-#: lib/cpio.c:1127
+#: lib/cpio.c:1133
 msgid " failed - "
 msgstr ""
 
@@ -2381,7 +2381,7 @@ msgid ""
 msgstr ""
 
 #: lib/formats.c:86 lib/formats.c:112 lib/formats.c:141 lib/formats.c:182
-#: lib/header.c:2114 lib/header.c:2131 lib/header.c:2151
+#: lib/header.c:2133 lib/header.c:2150 lib/header.c:2170
 msgid "(not a number)"
 msgstr ""
 
@@ -2410,78 +2410,78 @@ msgid "file %s is on an unknown device"
 msgstr ""
 
 #. This should not be allowed
-#: lib/header.c:223
+#: lib/header.c:244
 msgid "grabData() RPM_STRING_TYPE count must be 1.\n"
 msgstr ""
 
-#: lib/header.c:254 lib/header.c:726 lib/install.c:351
+#: lib/header.c:275 lib/header.c:745 lib/install.c:351
 #, c-format
 msgid "Data type %d not supported\n"
 msgstr ""
 
-#: lib/header.c:1089
+#: lib/header.c:1108
 #, c-format
 msgid "Bad count for headerAddEntry(): %d\n"
 msgstr ""
 
-#: lib/header.c:1499
+#: lib/header.c:1518
 #, c-format
 msgid "missing { after %"
 msgstr ""
 
-#: lib/header.c:1527
+#: lib/header.c:1546
 msgid "missing } after %{"
 msgstr ""
 
-#: lib/header.c:1539
+#: lib/header.c:1558
 msgid "empty tag format"
 msgstr ""
 
-#: lib/header.c:1549
+#: lib/header.c:1568
 msgid "empty tag name"
 msgstr ""
 
-#: lib/header.c:1564
+#: lib/header.c:1583
 msgid "unknown tag"
 msgstr ""
 
-#: lib/header.c:1589
+#: lib/header.c:1608
 msgid "] expected at end of array"
 msgstr ""
 
-#: lib/header.c:1605
+#: lib/header.c:1624
 msgid "unexpected ]"
 msgstr ""
 
-#: lib/header.c:1607
+#: lib/header.c:1626
 msgid "unexpected }"
 msgstr ""
 
-#: lib/header.c:1665
+#: lib/header.c:1684
 msgid "? expected in expression"
 msgstr ""
 
-#: lib/header.c:1672
+#: lib/header.c:1691
 msgid "{ expected after ? in expression"
 msgstr ""
 
-#: lib/header.c:1683 lib/header.c:1718
+#: lib/header.c:1702 lib/header.c:1737
 msgid "} expected in expression"
 msgstr ""
 
-#: lib/header.c:1691
+#: lib/header.c:1710
 msgid ": expected following ? subexpression"
 msgstr ""
 
-#: lib/header.c:1705
+#: lib/header.c:1724
 msgid "{ expected after : in expression"
 msgstr ""
 
-#: lib/header.c:1726
+#: lib/header.c:1745
 msgid "| expected at end of expression"
 msgstr ""
 
-#: lib/header.c:1893
+#: lib/header.c:1912
 msgid "(unknown type)"
 msgstr ""
 
@@ -3353,121 +3353,121 @@ msgstr ""
 msgid "file is not regular -- skipping size check\n"
 msgstr ""
 
-#: lib/signature.c:139
+#: lib/signature.c:135
 msgid "No signature\n"
 msgstr ""
 
-#: lib/signature.c:142
+#: lib/signature.c:138
 msgid "Old PGP signature\n"
 msgstr ""
 
-#: lib/signature.c:154
+#: lib/signature.c:150
 msgid "Old (internal-only) signature!  How did you get that!?"
 msgstr ""
 
-#: lib/signature.c:158
+#: lib/signature.c:154
 msgid "New Header signature\n"
 msgstr ""
 
 #. 8-byte pad
-#: lib/signature.c:165 lib/signature.c:207
+#: lib/signature.c:161 lib/signature.c:203
 #, c-format
 msgid "Signature size: %d\n"
 msgstr ""
 
-#: lib/signature.c:166 lib/signature.c:208
+#: lib/signature.c:162 lib/signature.c:204
 #, c-format
 msgid "Signature pad : %d\n"
 msgstr ""
 
-#: lib/signature.c:271
+#: lib/signature.c:267
 #, c-format
 msgid "Couldn't exec pgp (%s)"
 msgstr ""
 
-#: lib/signature.c:282
+#: lib/signature.c:278
 msgid "pgp failed"
 msgstr ""
 
 #. PGP failed to write signature
 #. Just in case
-#: lib/signature.c:289
+#: lib/signature.c:285
 msgid "pgp failed to write signature"
 msgstr ""
 
-#: lib/signature.c:294
+#: lib/signature.c:290
 #, c-format
 msgid "PGP sig size: %d\n"
 msgstr ""
 
-#: lib/signature.c:305 lib/signature.c:382
+#: lib/signature.c:301 lib/signature.c:378
 msgid "unable to read the signature"
 msgstr ""
 
-#: lib/signature.c:310
+#: lib/signature.c:306
 #, c-format
 msgid "Got %d bytes of PGP sig\n"
 msgstr ""
 
-#: lib/signature.c:348 lib/signature.c:693
+#: lib/signature.c:344 lib/signature.c:689
 msgid "Couldn't exec gpg"
 msgstr ""
 
-#: lib/signature.c:359
+#: lib/signature.c:355
 msgid "gpg failed"
 msgstr ""
 
 #. GPG failed to write signature
 #. Just in case
-#: lib/signature.c:366
+#: lib/signature.c:362
 msgid "gpg failed to write signature"
 msgstr ""
 
-#: lib/signature.c:371
+#: lib/signature.c:367
 #, c-format
 msgid "GPG sig size: %d\n"
 msgstr ""
 
-#: lib/signature.c:387
+#: lib/signature.c:383
 #, c-format
 msgid "Got %d bytes of GPG sig\n"
 msgstr ""
 
-#: lib/signature.c:414
+#: lib/signature.c:410
 msgid "Generating signature using PGP.\n"
 msgstr ""
 
-#: lib/signature.c:420
+#: lib/signature.c:416
 msgid "Generating signature using GPG.\n"
 msgstr ""
 
-#: lib/signature.c:499 lib/signature.c:561
+#: lib/signature.c:495 lib/signature.c:557
 msgid "Could not run pgp.  Use --nopgp to skip PGP checks."
 msgstr ""
 
-#: lib/signature.c:559 lib/signature.c:632
+#: lib/signature.c:555 lib/signature.c:628
 msgid "exec failed!\n"
 msgstr ""
 
-#: lib/signature.c:634
+#: lib/signature.c:630
 msgid "Could not run gpg.  Use --nogpg to skip GPG checks."
 msgstr ""
 
-#: lib/signature.c:722
+#: lib/signature.c:718
 msgid "Couldn't exec pgp"
 msgstr ""
 
 #. @notreached@
 #. This case should have been screened out long ago.
-#: lib/signature.c:726 lib/signature.c:779
+#: lib/signature.c:722 lib/signature.c:775
 msgid "Invalid %%_signature spec in macro file"
 msgstr ""
 
-#: lib/signature.c:759
+#: lib/signature.c:755
 msgid "You must set \"%%_gpg_name\" in your macro file"
 msgstr ""
 
-#: lib/signature.c:771
+#: lib/signature.c:767
 msgid "You must set \"%%_pgp_name\" in your macro file"
 msgstr ""
 
index b8c6688..d39b6dd 100644 (file)
@@ -11,28 +11,45 @@ static inline int fdFileno(void * cookie);
 #include <rpmurl.h>
 #include <assert.h>
 
+/** \ingroup rpmio
+ */
 typedef struct _FDSTACK_s {
        FDIO_t          io;
 /*@dependent@*/ void * fp;
        int             fdno;
 } FDSTACK_t;
 
+/** \ingroup rpmio
+ * Cumulative statistics for an I/O operation.
+ */
 typedef struct {
-       int             count;
-       off_t           bytes;
-       time_t          msecs;
+       int             count;  /*!< Number of operations. */
+       off_t           bytes;  /*!< Number of bytes transferred. */
+       time_t          msecs;  /*!< Number of milli-seconds. */
 } OPSTAT_t;
 
+/** \ingroup rpmio
+ * Identify per-desciptor I/O operation statistics.
+ */
+enum FDSTAT_e {
+       FDSTAT_READ     = 0,    /*!< Read statistics index. */
+       FDSTAT_WRITE    = 1,    /*!< Write statistics index. */
+       FDSTAT_SEEK     = 2,    /*!< Seek statistics index. */
+       FDSTAT_CLOSE    = 3     /*!< Close statistics. index */
+};
+
+/** \ingroup rpmio
+ * Cumulative statistics for a descriptor.
+ */
 typedef        struct {
-       struct timeval  create;
-       struct timeval  begin;
-       OPSTAT_t        ops[4];
-#define        FDSTAT_READ     0
-#define        FDSTAT_WRITE    1
-#define        FDSTAT_SEEK     2
-#define        FDSTAT_CLOSE    3
+       struct timeval  create; /*!< Structure creation time. */
+       struct timeval  begin;  /*!< Operation start time. */
+       OPSTAT_t        ops[4]; /*!< Cumulative statistics. */
 } FDSTAT_t;
 
+/** \ingroup rpmio
+ * The FD_t File Handle data structure.
+ */
 struct _FD_s {
 /*@refs@*/ int         nrefs;
        int             flags;
@@ -88,47 +105,65 @@ int ftpCmd(const char * cmd, const char * url, const char * arg2);
 
 int ufdClose( /*@only@*/ void * cookie);
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline /*@null@*/ const FDIO_t fdGetIo(FD_t fd) {
     FDSANE(fd);
     return fd->fps[fd->nfps].io;
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline void fdSetIo(FD_t fd, FDIO_t io) {
     FDSANE(fd);
     fd->fps[fd->nfps].io = io;
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline /*@dependent@*/ /*@null@*/ FILE * fdGetFILE(FD_t fd) {
     FDSANE(fd);
     return ((FILE *)fd->fps[fd->nfps].fp);
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline /*@dependent@*/ /*@null@*/ void * fdGetFp(FD_t fd) {
     FDSANE(fd);
     return fd->fps[fd->nfps].fp;
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline void fdSetFp(FD_t fd, void * fp) {
     FDSANE(fd);
     fd->fps[fd->nfps].fp = fp;
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline int fdGetFdno(FD_t fd) {
     FDSANE(fd);
     return fd->fps[fd->nfps].fdno;
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline void fdSetFdno(FD_t fd, int fdno) {
     FDSANE(fd);
     fd->fps[fd->nfps].fdno = fdno;
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline void fdSetContentLength(FD_t fd, ssize_t contentLength)
 {
     FDSANE(fd);
     fd->contentLength = fd->bytesRemain = contentLength;
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline void fdPush(FD_t fd, FDIO_t io,
        void * fp, int fdno)
 {
@@ -141,6 +176,8 @@ int ufdClose( /*@only@*/ void * cookie);
     fdSetFdno(fd, fdno);
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline void fdPop(FD_t fd) {
     FDSANE(fd);
     if (fd->nfps < 0) return;
@@ -150,6 +187,8 @@ int ufdClose( /*@only@*/ void * cookie);
     fd->nfps--;
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline void fdstat_enter(FD_t fd, int opx)
 {
     if (fd->stats == NULL) return;
@@ -157,6 +196,8 @@ int ufdClose( /*@only@*/ void * cookie);
     gettimeofday(&fd->stats->begin, NULL);
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline time_t tvsub(struct timeval *etv, struct timeval *btv) {
     time_t secs, usecs;
     if (!(etv && btv)) return 0;
@@ -169,6 +210,8 @@ int ufdClose( /*@only@*/ void * cookie);
     return ((secs * 1000) + (usecs/1000));
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline void fdstat_exit(FD_t fd, int opx, ssize_t rc)
 {
     struct timeval end;
@@ -190,6 +233,8 @@ int ufdClose( /*@only@*/ void * cookie);
     fd->stats->begin = end;    /* structure assignment */
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline void fdstat_print(FD_t fd, const char * msg, FILE * fp) {
     int opx;
     if (fd->stats == NULL) return;
@@ -217,27 +262,37 @@ int ufdClose( /*@only@*/ void * cookie);
     }
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline void fdSetSyserrno(FD_t fd, int syserrno, /*@kept@*/ const void * errcookie) {
     FDSANE(fd);
     fd->syserrno = syserrno;
     fd->errcookie = errcookie;
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline int fdGetRdTimeoutSecs(FD_t fd) {
     FDSANE(fd);
     return fd->rd_timeoutsecs;
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline long int fdGetCpioPos(FD_t fd) {
     FDSANE(fd);
     return fd->fd_cpioPos;
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline void fdSetCpioPos(FD_t fd, long int cpioPos) {
     FDSANE(fd);
     fd->fd_cpioPos = cpioPos;
 }
 
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline FD_t c2f(void * cookie) {
     FD_t fd = (FD_t) cookie;
     FDSANE(fd);
@@ -245,6 +300,8 @@ int ufdClose( /*@only@*/ void * cookie);
 }
 
 /*@-shadow@*/
+/** \ingroup rpmio
+ */
 /*@unused@*/ static inline int fdFileno(void * cookie) {
     FD_t fd;
     if (cookie == NULL) return -2;