summaryrefslogtreecommitdiff
path: root/rpmio
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-10-14 17:19:09 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-10-14 17:19:09 +0300
commitefd874ae6a0ac17e269b1c5daed4f09939c94815 (patch)
tree73f34c2c15c4ee0c36e79cb5154c11a25e88c777 /rpmio
parente5be860abb675dff7f5488073f8f836cb5c908c5 (diff)
downloadlibrpm-tizen-efd874ae6a0ac17e269b1c5daed4f09939c94815.tar.gz
librpm-tizen-efd874ae6a0ac17e269b1c5daed4f09939c94815.tar.bz2
librpm-tizen-efd874ae6a0ac17e269b1c5daed4f09939c94815.zip
Make FD_t struct opaque, finally
Diffstat (limited to 'rpmio')
-rw-r--r--rpmio/rpmio.c42
-rw-r--r--rpmio/rpmio_internal.h47
2 files changed, 42 insertions, 47 deletions
diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
index 93253eea0..15e3c3f3d 100644
--- a/rpmio/rpmio.c
+++ b/rpmio/rpmio.c
@@ -24,11 +24,53 @@ extern int h_errno;
#include <rpm/rpmlog.h>
#include <rpm/rpmmacro.h>
#include <rpm/rpmfileutil.h>
+#include <rpm/rpmsw.h>
+#include <rpm/rpmurl.h>
#include "rpmio/rpmio_internal.h"
#include "debug.h"
+typedef struct _FDSTACK_s {
+ FDIO_t io;
+ void * fp;
+ int fdno;
+} FDSTACK_t;
+
+/** \ingroup rpmio
+ * Cumulative statistics for a descriptor.
+ */
+typedef struct {
+ struct rpmop_s ops[FDSTAT_MAX]; /*!< Cumulative statistics. */
+} * FDSTAT_t;
+
+/** \ingroup rpmio
+ * The FD_t File Handle data structure.
+ */
+struct _FD_s {
+ int nrefs;
+ int flags;
+#define RPMIO_DEBUG_IO 0x40000000
+#define RPMIO_DEBUG_REFS 0x20000000
+ int magic;
+#define FDMAGIC 0x04463138
+ int nfps;
+ FDSTACK_t fps[8];
+ int urlType; /* ufdio: */
+
+ int rd_timeoutsecs; /* ufdRead: per FD_t timer */
+ ssize_t bytesRemain; /* ufdio: */
+
+ int syserrno; /* last system errno encountered */
+ const void *errcookie; /* gzdio/bzdio/ufdio/xzdio: */
+
+ FDSTAT_t stats; /* I/O statistics */
+
+ rpmDigestBundle digests;
+};
+
+#define FDSANE(fd) assert(fd && fd->magic == FDMAGIC)
+
#define DBG(_f, _m, _x) \
\
if ((_rpmio_debug | ((_f) ? ((FD_t)(_f))->flags : 0)) & (_m)) fprintf _x \
diff --git a/rpmio/rpmio_internal.h b/rpmio/rpmio_internal.h
index 31455fb2f..2527d1ca8 100644
--- a/rpmio/rpmio_internal.h
+++ b/rpmio/rpmio_internal.h
@@ -5,55 +5,8 @@
* \file rpmio/rpmio_internal.h
*/
-#include <assert.h>
-
#include <rpm/rpmio.h>
-#include <rpm/rpmurl.h>
-
#include <rpm/rpmpgp.h>
-#include <rpm/rpmsw.h>
-
-/** \ingroup rpmio
- */
-typedef struct _FDSTACK_s {
- FDIO_t io;
- void * fp;
- int fdno;
-} FDSTACK_t;
-
-/** \ingroup rpmio
- * Cumulative statistics for a descriptor.
- */
-typedef struct {
- struct rpmop_s ops[FDSTAT_MAX]; /*!< Cumulative statistics. */
-} * FDSTAT_t;
-
-/** \ingroup rpmio
- * The FD_t File Handle data structure.
- */
-struct _FD_s {
- int nrefs;
- int flags;
-#define RPMIO_DEBUG_IO 0x40000000
-#define RPMIO_DEBUG_REFS 0x20000000
- int magic;
-#define FDMAGIC 0x04463138
- int nfps;
- FDSTACK_t fps[8];
- int urlType; /* ufdio: */
-
- int rd_timeoutsecs; /* ufdRead: per FD_t timer */
- ssize_t bytesRemain; /* ufdio: */
-
- int syserrno; /* last system errno encountered */
- const void *errcookie; /* gzdio/bzdio/ufdio/xzdio: */
-
- FDSTAT_t stats; /* I/O statistics */
-
- rpmDigestBundle digests;
-};
-
-#define FDSANE(fd) assert(fd && fd->magic == FDMAGIC)
#ifdef __cplusplus
extern "C" {