]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/saxdb.h
remove some debug chatter
[irc/evilnet/x3.git] / src / saxdb.h
index bc063c06ba8afc48e92d785659eead02986b66a1..09a7179fe68a955b6149603dca66a9ae3eb58ef5 100644 (file)
@@ -1,11 +1,11 @@
 /* saxdb.h - srvx database manager
  * Copyright 2002-2004 srvx Development Team
  *
- * This file is part of srvx.
+ * This file is part of x3.
  *
- * srvx is free software; you can redistribute it and/or modify
+ * x3 is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
 DECLARE_LIST(int_list, int);
 
 struct saxdb;
-/* This definition should ONLY be used so callers of
- * saxdb_open_context() can initialize jbuf properly. */
-struct saxdb_context {
-    FILE *output;
-    unsigned int indent;
-    struct int_list complex;
-    jmp_buf jbuf;
-};
-
+struct saxdb_context;
 
 #define SAXDB_READER(NAME) int NAME(struct dict *db)
 typedef SAXDB_READER(saxdb_reader_func_t);
@@ -46,7 +38,7 @@ void saxdb_init(void);
 void saxdb_finalize(void);
 struct saxdb *saxdb_register(const char *name, saxdb_reader_func_t *reader, saxdb_writer_func_t *writer);
 void saxdb_write(const char *db_name);
-void saxdb_write_all(void);
+void saxdb_write_all(void* extra);
 int write_database(FILE *out, struct dict *db);
 
 /* Callbacks for SAXDB_WRITERs */
@@ -55,9 +47,11 @@ void saxdb_end_record(struct saxdb_context *dest);
 void saxdb_write_string_list(struct saxdb_context *dest, const char *name, struct string_list *list);
 void saxdb_write_string(struct saxdb_context *dest, const char *name, const char *value);
 void saxdb_write_int(struct saxdb_context *dest, const char *name, unsigned long value);
+void saxdb_write_sint(struct saxdb_context *dest, const char *name, long value);
 
 /* For doing db writing by hand */
 struct saxdb_context *saxdb_open_context(FILE *f);
-void saxdb_close_context(struct saxdb_context *ctx);
+void saxdb_close_context(struct saxdb_context *ctx, int close_file);
+jmp_buf *saxdb_jmp_buf(struct saxdb_context *ctx);
 
 #endif /* !defined(DBMGR_H) */