/* saxdb.c - 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,
void
saxdb_write_int(struct saxdb_context *dest, const char *name, unsigned long value) {
- unsigned char buf[16];
+ char buf[16];
/* we could optimize this to take advantage of the fact that buf will never need escapes */
snprintf(buf, sizeof(buf), "%lu", value);
saxdb_write_string(dest, name, buf);
}
+void
+saxdb_write_sint(struct saxdb_context *dest, const char *name, long value) {
+ char buf[16];
+ /* we could optimize this to take advantage of the fact that buf will never need escapes */
+ snprintf(buf, sizeof(buf), "%ld", value);
+ saxdb_write_string(dest, name, buf);
+}
+
static void
saxdb_free(void *data) {
struct saxdb *db = data;