]> code.citadel.org Git - citadel.git/blobdiff - webcit/snprintf.c
* All OS-level includes are now included from webcit.h instead of from
[citadel.git] / webcit / snprintf.c
index 5cf567fd65b99be635573219278561c59378c3ca..d98178b48b86edfb0bdbcfbb9e201fd3a0a3e602 100644 (file)
@@ -1,8 +1,9 @@
 /*
+ * $Id$
+ *
  * modified from Sten Gunterberg's BUGTRAQ post of 22 Jul 1997
  * --nathan bryant <bryant@cs.usm.maine.edu>
  *
- * $Id$
  */
 
 /*
  * Written July 1997 by Sten Gunterberg (gunterberg@ergon.ch)
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
+#include "webcit.h"
+#include "webserver.h"
 
 static int needed(const char *fmt, va_list argp)
 {
@@ -50,7 +49,7 @@ int vsnprintf(char *buf, size_t max, const char *fmt, va_list argp)
        int size;
 
        if ((p = malloc(needed(fmt, argp) + 1)) == NULL) {
-               fprintf(stderr, "vsnprintf: malloc failed, aborting\n");
+               lprintf(1, "vsnprintf: malloc failed, aborting\n");
                abort();
        }
        if ((size = vsprintf(p, fmt, argp)) >= max)