Removed:
trunk/c/lib/database.h
Modified:
trunk/c/include/toweldb.h
trunk/c/lib/database.c
trunk/c/lib/parser.c
trunk/c/lib/record.h
Log:
Toss any idea of encapsulation; just get the silly thing to compile.
Modified: trunk/c/include/toweldb.h
==============================================================================
--- trunk/c/include/toweldb.h (original)
+++ trunk/c/include/toweldb.h Sat Jul 19 06:13:45 2008
@@ -65,15 +65,14 @@
typedef struct
{
DIR* db_dir;
- char* path;ex
+ char* path;
char mode;
toweldb_err error;
char max_key_len;
} toweldb_db;
/* Record */
-typedef struct toweldb_rec
-typedef struct
+typedef struct toweldb_rec
{
time_t read_time;
toweldb_db* parent;
@@ -90,8 +89,6 @@
/* Close a database and free the memory storing it. */
/* Record functions */
-unsigned int toweldb_get_num_recs( toweldb_db* db );
- /* Get the number of records in the database. */
char* toweldb_get_next_key( toweldb_db* db );
/* Get the next key in the database. This is a wrapper around the POSIX
* readdir that skips entries that the programmer doesn't need. It will
Modified: trunk/c/lib/database.c
==============================================================================
--- trunk/c/lib/database.c (original)
+++ trunk/c/lib/database.c Sat Jul 19 06:13:45 2008
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "database.h"
+#include "toweldb.h"
toweldb_db*
toweldb_open( const char* path, const char mode )
Modified: trunk/c/lib/parser.c
==============================================================================
--- trunk/c/lib/parser.c (original)
+++ trunk/c/lib/parser.c Sat Jul 19 06:13:45 2008
@@ -16,6 +16,7 @@
*/
#include "toweldb.h"
+#include "record.h"
#define TOWELDB_COMPONENT_NONE 0
#define TOWELDB_COMPONENT_KEY 1
Modified: trunk/c/lib/record.h
==============================================================================
--- trunk/c/lib/record.h (original)
+++ trunk/c/lib/record.h Sat Jul 19 06:13:45 2008
@@ -20,27 +20,6 @@
#include "toweldb.h"
-/* Linked list of record fields */
-typedef struct _toweldb_tuple
-{
- off_t key_loc;
- off_t value_end;
- unsigned int key_len;
- unsigned long value_len;
- char* key;
- char* value;
- struct _toweldb_tuple* next;
-} toweldb_field_node;
-
-/* Record */
-typedef struct
-{
- time_t read_time;
- toweldb_db* parent;
- char* key;
- toweldb_field_node* contents_start;
-} toweldb_rec;
-
/* Record functions */
char* toweldb_get_path( toweldb_db* db, const char* key );
/* Get the path to the record specified jointly by the database and the