]> git.pond.sub.org Git - empserver/commitdiff
(logerror): The version from libcommon.a logs to a file, which is
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 19 Feb 2004 15:19:20 +0000 (15:19 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 19 Feb 2004 15:19:20 +0000 (15:19 +0000)
inappropriate for this program.  Log to stderr instead.
(program): Unused, remove.

src/util/files.c

index 5f5878ba4f84ebcfeb8fd9295d04abafed706337..c942b3c8a6c0e136e55c3288672e5eaf77946454 100644 (file)
@@ -45,6 +45,7 @@
 #else
 #include <direct.h>
 #endif
+#include <stdarg.h>
 #include <stdio.h>
 
 #include "options.h"
@@ -63,8 +64,6 @@
 #include "prototypes.h"
 #include "optlist.h"
 
-s_char program[] = "file";
-
 static void comminit(int fd);
 static int make(char *filename);
 static void file_sct_init(coord x, coord y, s_char *ptr);
@@ -258,6 +257,16 @@ file_sct_init(coord x, coord y, s_char *ptr)
     sp->sct_dist_y = y;
 }
 
+void
+logerror(s_char *format, ...)
+{
+    va_list ap;
+
+    va_start(ap, format);
+    vfprintf(stderr, format, ap);
+    va_end(ap);
+}
+
 void
 log_last_commands(void)
 {