Do not eat first word in ?part reason.
[srvx.git] / src / saxdb.h
index 38a0fc94e972fdb912475870832fae6e81ee80ae..0a2eecbc18c253c35d4eab8e21aa56091869232a 100644 (file)
@@ -1,11 +1,12 @@
 /* saxdb.h - srvx database manager
  * Copyright 2002-2004 srvx Development Team
  *
- * This program is free software; you can redistribute it and/or modify
+ * This file is part of srvx.
+ *
+ * srvx 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
- * (at your option) any later version.  Important limitations are
- * listed in the COPYING file that accompanies this software.
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -13,7 +14,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, email srvx-maintainers@srvx.net.
+ * along with srvx; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
  */
 
 #if !defined(DBMGR_H)
 
 #include "recdb.h"
 
+DECLARE_LIST(int_list, int);
+
 struct saxdb;
-struct saxdb_context;
+/* 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;
+};
+
 
 #define SAXDB_READER(NAME) int NAME(struct dict *db)
 typedef SAXDB_READER(saxdb_reader_func_t);
@@ -43,6 +55,7 @@ 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);