fix possible crash on user deletion
[srvx.git] / src / saxdb.h
index 38a0fc94e972fdb912475870832fae6e81ee80ae..de1bbfe6f318d7bf15cef8be0126cb349396fc41 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)
@@ -21,6 +23,8 @@
 
 #include "recdb.h"
 
+DECLARE_LIST(int_list, int);
+
 struct saxdb;
 struct saxdb_context;
 
@@ -43,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);
+jmp_buf *saxdb_jmp_buf(struct saxdb_context *ctx);
+void saxdb_close_context(struct saxdb_context *ctx, int close_file);
 
 #endif /* !defined(DBMGR_H) */