diff --git a/uquake/Makefile.in b/uquake/Makefile.in index 676e9ee..0fdbb28 100644 --- a/uquake/Makefile.in +++ b/uquake/Makefile.in @@ -268,7 +268,7 @@ $(COMMON_LIB): common_lib_DIR $(BUILD_DIR)/common_lib.a $(BUILD_DIR)/common_lib.a: $(ALL_COMMON_LIB_OBJS) ar cru $@ $(ALL_COMMON_LIB_OBJS) - ranlib $@ + @RANLIB@ $@ # X11 software target diff --git a/uquake/sys_unix.c b/uquake/sys_unix.c index a3a7bc7..daf9d52 100644 --- a/uquake/sys_unix.c +++ b/uquake/sys_unix.c @@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // sys_unix.c -- Unix system driver #include "quakedef.h" +#include "sys.h" #include #include #include @@ -173,6 +174,31 @@ int Sys_FileWrite (int handle, void *data, int count) return fwrite (data, 1, count, sys_handles[handle].hFile); } +void Sys_DebugLog(char *file, char *fmt, ...) { + + va_list argptr; + static char data[1024]; + FILE *stream; + unsigned char *p; + //int fd; + + va_start(argptr, fmt); + vsnprintf(data, sizeof(data), fmt, argptr); + va_end(argptr); +// fd = open(file, O_WRONLY | O_BINARY | O_CREAT | O_APPEND, 0666); + stream = fopen(file, "a"); + for (p = (unsigned char *) data; *p; p++) { + putc(trans_table[*p], stream); + } + fclose(stream); + /* + fd = open(file, O_WRONLY | O_CREAT | O_APPEND, 0666); + write(fd, data, strlen(data)); + close(fd); + */ +} + + /* ===============================================================================