From ccf1af849b6c623db0f0d42c6e67e469c4d27c93 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Wed, 28 Dec 2016 22:07:46 +1000 Subject: [PATCH] * make simdb_t opaque type --- src/database.c | 6 ++++++ src/database.h | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/database.c b/src/database.c index 523a9de..9107395 100644 --- a/src/database.c +++ b/src/database.c @@ -18,6 +18,12 @@ #include "database.h" #include "bitmap.h" +struct _simdb_t { + int fd; + int flags; + char path[PATH_MAX]; +}; + #define DB_READ(db, buf, len, off) \ errno = 0; \ memset((buf), 0x0, (len)); \ diff --git a/src/database.h b/src/database.h index 4996675..49bfd32 100644 --- a/src/database.h +++ b/src/database.h @@ -22,11 +22,7 @@ #define SIMDB_ERR_NXRECORD -5 /* no such record in database */ #define SIMDB_ERR_READONLY -6 /* database opened in read-only mode */ -typedef struct { - int fd; - int flags; - char path[PATH_MAX]; -} simdb_t; +typedef struct _simdb_t simdb_t; /* opaque database type */ /** Database header format - fixed length, 48 bytes