'Adjust extern C {} blocks.'
authorRalf Corsépius <corsepiu@fedoraproject.org>
Mon, 8 Oct 2007 08:05:06 +0000 (10:05 +0200)
committerRalf Corsépius <corsepiu@fedoraproject.org>
Mon, 8 Oct 2007 08:05:06 +0000 (10:05 +0200)
24 files changed:
build/rpmbuild.h
build/rpmfc.h
build/rpmspec.h
lib/idtx.h
lib/rpmal.h
lib/rpmcli.h
lib/rpmds.h
lib/rpmfi.h
lib/rpmgi.h
lib/rpmlib.h
lib/rpmps.h
lib/rpmte.h
lib/rpmts.h
lib/stringbuf.h
rpmio/argv.h
rpmio/rpmerr.h
rpmio/rpmio.h
rpmio/rpmlog.h
rpmio/rpmmacro.h
rpmio/rpmmessages.h
rpmio/rpmpgp.h
rpmio/rpmsq.h
rpmio/rpmsw.h
rpmio/rpmurl.h

index 7f61b8c..fb8aaf2 100644 (file)
 /* but this will be needed */
 #include "rpmspec.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /** \ingroup rpmbuild
  * Bit(s) to control buildSpec() operation.
  */
@@ -73,10 +77,6 @@ typedef enum rpmParseState_e {
 #define STRIP_TRAILINGSPACE (1 << 0)
 #define STRIP_COMMENTS      (1 << 1)
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /** \ingroup rpmbuild
  * Destroy uid/gid caches.
  */
index 0f4afd4..d9115e4 100644 (file)
@@ -3,6 +3,10 @@
 
 #include <magic.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 extern int _rpmfc_debug;
 
 /**
@@ -62,10 +66,6 @@ struct rpmfcTokens_s {
  */
 typedef struct rpmfcTokens_s * rpmfcToken;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Return helper output.
  * @param av           helper argv (with possible macros)
index 567cc0f..b6603c0 100644 (file)
@@ -6,6 +6,10 @@
  *  The rpmSpec and Package data structures used during build.
  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /** \ingroup rpmbuild
  */
 typedef struct Package_s * Package;
@@ -169,10 +173,6 @@ struct Package_s {
     Package next;
 };
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /** \ingroup rpmbuild
  * Create and initialize rpmSpec structure.
  * @return spec                spec file control structure
index 99d720c..dbe3b37 100644 (file)
@@ -3,6 +3,10 @@
 
 #include "rpmlib.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  *  * A rollback transaction id element.
  *   */
@@ -71,4 +75,8 @@ IDTX IDTXload(rpmts ts, rpmTag tag);
  */
 IDTX IDTXglob(rpmts ts, const char * globstr, rpmTag tag);
 
+#ifdef __cplusplus
+}   
+#endif
+
 #endif /* H_RPMIDTX */
index cbd6ebd..503837c 100644 (file)
@@ -6,6 +6,10 @@
  * Structures used for managing added/available package lists.
  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 extern int _rpmal_debug;
 
 /**
@@ -23,10 +27,6 @@ typedef void * rpmalKey;
  *   */
 typedef intptr_t rpmalNum;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Initialize available packckages, items, and directory list.
  * @param delta                no. of entries to add on each realloc
index 9229127..85d690e 100644 (file)
 #include "argv.h"
 #include "idtx.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /** \ingroup rpmcli
  * Should version 3 packages be produced?
  */
 extern int _noDirTokens;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /** \ingroup rpmcli
  * Popt option table for options shared by all modes and executables.
  */
index e4b251b..bad5e40 100644 (file)
@@ -8,6 +8,10 @@
 
 #include "rpmps.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  */
 extern int _rpmds_debug;
@@ -41,10 +45,6 @@ struct rpmds_s {
 };
 #endif /* _RPMDS_INTERNAL */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Unreference a dependency set instance.
  * @param ds           dependency set
index baed1dc..5cc01a7 100644 (file)
@@ -6,6 +6,10 @@
  * Structure(s) used for file info tag sets.
  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 extern int _rpmfi_debug;
 
 #if defined(_RPMFI_INTERNAL)
@@ -134,10 +138,6 @@ int nrefs;         /*!< Reference count. */
 
 #endif /* _RPMFI_INTERNAL */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Unreference a file info set instance.
  * @param fi           file info set
index 7064d17..fd9cc5d 100644 (file)
 #include "rpmts.h"
 #include "argv.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  */
 extern int _rpmgi_debug;
@@ -60,10 +64,6 @@ struct rpmgi_s {
 };
 #endif
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Unreference a generalized iterator instance.
  * @param gi           generalized iterator
index 7cd9bee..5b6b0aa 100644 (file)
 #include "header.h"
 #include <popt.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Package read return codes.
  */
@@ -37,10 +41,6 @@ extern const char * rpmEVR;
 
 extern int rpmFLAGS;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /** \ingroup rpmtrans
  * The RPM Transaction Set.
  * Transaction sets are inherently unordered! RPM may reorder transaction
index 1a8a453..a749cbd 100644 (file)
@@ -6,6 +6,10 @@
  * Structures and prototypes used for an "rpmps" problem set.
  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 extern int _rpmps_debug;
 
 /**
@@ -57,10 +61,6 @@ struct rpmps_s {
     int nrefs;                 /*!< Reference count. */
 };
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Return formatted string representation of a problem.
  * @param prob         rpm problem
index 2edf04f..476841e 100644 (file)
@@ -8,6 +8,10 @@
 
 #include "rpmal.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  */
 extern int _rpmte_debug;
@@ -113,10 +117,6 @@ struct rpmtsi_s {
 
 #endif /* _RPMTE_INTERNAL */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Destroy a transaction element.
  * @param te           transaction element
index 857b537..f4f3740 100644 (file)
@@ -9,6 +9,10 @@
 #include "rpmps.h"
 #include "rpmsw.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 extern int _rpmts_debug;
 extern int _rpmts_stats;
 extern int _fps_debug;
@@ -294,10 +298,6 @@ struct rpmts_s {
 };
 #endif /* _RPMTS_INTERNAL */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /** \ingroup rpmts
  * Check that all dependencies can be resolved.
  * @param ts           transaction set
index a5fa7e6..e4336ec 100644 (file)
@@ -5,16 +5,16 @@
  *
  */
 
-/**
- */
-typedef struct StringBufRec *StringBuf;
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /**
  */
+typedef struct StringBufRec *StringBuf;
+
+/**
+ */
 StringBuf newStringBuf(void);
 
 /**
index e944754..2a7a85f 100644 (file)
@@ -5,6 +5,10 @@
  * \file rpmio/argv.h
  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef        const char * ARGstr_t;
 typedef ARGstr_t * ARGV_t;
 
@@ -15,10 +19,6 @@ struct ARGI_s {
 };
 typedef        struct ARGI_s * ARGI_t;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Print argv array elements.
  * @param msg          output message prefix (or NULL)
index 211f1ad..71e63b4 100644 (file)
@@ -8,6 +8,10 @@
 
 #include "rpmlog.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define        _em(_e) \
     (((_e) << 16) | RPMLOG_MAKEPRI(RPMLOG_ERRMSG, RPMLOG_ERR))
 #define        _wm(_e) \
@@ -120,5 +124,8 @@ typedef enum rpmerrCode_e {
 #define        rpmErrorSetCallback(_cb)        rpmlogSetCallback(_cb)
 typedef rpmlogCallback rpmErrorCallBackType;
 
+#ifdef __cplusplus
+}   
+#endif
 
 #endif  /* H_RPMERR */
index e6b8aa1..1bb4b9b 100644 (file)
 #include <stdlib.h>
 #include <unistd.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  */
 typedef struct pgpDig_s * pgpDig;
@@ -46,10 +50,6 @@ typedef      struct _FD_s * FD_t;
  */
 typedef struct FDIO_s * FDIO_t;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /** \ingroup rpmio
  * \name RPMIO Vectors.
  */
index 624a7e7..6727b8a 100644 (file)
@@ -9,6 +9,10 @@
 
 #include <stdarg.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * RPM Log levels.
  * priorities/facilities are encoded into a single 32-bit quantity, where the
@@ -157,10 +161,6 @@ typedef struct rpmlogRec_s {
     const char * message;
 } * rpmlogRec;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Return number of rpmError() ressages.
  * @return             number of messages
index 2e27c05..2b58ecd 100644 (file)
@@ -5,6 +5,10 @@
  * \file rpmio/rpmmacro.h
  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*! The structure used to store a macro. */
 typedef struct rpmMacroEntry_s {
     struct rpmMacroEntry_s *prev;/*!< Macro entry stack. */
@@ -46,10 +50,6 @@ extern const char * macrofiles;
 #define        RMIL_OLDSPEC    -1
 #define        RMIL_GLOBAL     0
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Print macros to file stream.
  * @param mc           macro context (NULL uses global context).
index 6f52e2d..0b26d1a 100644 (file)
@@ -8,6 +8,10 @@
 
 #include "rpmlog.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define        RPMMESS_DEBUG           RPMLOG_DEBUG
 #define        RPMMESS_VERBOSE         RPMLOG_INFO
 #define        RPMMESS_NORMAL          RPMLOG_NOTICE
@@ -60,10 +64,6 @@ typedef enum rpmCallbackType_e {
  */
 typedef void * rpmCallbackData;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  */
 typedef void * (*rpmCallbackFunction)
index 758aee8..18ce5e4 100644 (file)
 
 #include <string.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if !defined(_BEECRYPT_API_H)
 typedef unsigned char byte;
 #endif /* _BEECRYPT_API_H */
@@ -954,10 +958,6 @@ typedef enum rpmDigestFlags_e {
 } rpmDigestFlags;
 
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Return (native-endian) integer from big-endian representation.
  * @param s            pointer to big-endian integer
index 52a47f0..0d0f4fa 100644 (file)
@@ -8,6 +8,10 @@
 
 #include "rpmsw.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  */
 typedef struct rpmsig_s * rpmsig;
@@ -48,10 +52,6 @@ extern rpmsq rpmsqQueue;
 
 extern sigset_t rpmsqCaught;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Insert node into from queue.
  * @param elem         node to link
index 0ece223..d9f62d1 100644 (file)
@@ -5,6 +5,10 @@
  * \file rpmio/rpmsw.h
  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /** \ingroup rpmio
  */
 typedef unsigned long int rpmtime_t;
@@ -37,10 +41,6 @@ struct rpmop_s {
     rpmtime_t          usecs;  /*!< Number of ticks. */
 };
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /** Return benchmark time stamp.
  * @param *sw          time stamp
  * @return             0 on success
index 1c768c5..8bd599b 100644 (file)
@@ -7,6 +7,10 @@
 
 #include <assert.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Supported URL types.
  */
@@ -44,10 +48,6 @@ struct urlinfo_s {
     int magic;
 };
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 extern int _url_debug;         /*!< URL debugging? */
 
 /**