src/saxdb.* (saxdb_write_sint): New function.
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;
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);