summaryrefslogtreecommitdiff
path: root/src/deh_main.h
diff options
context:
space:
mode:
authorSimon Howard2010-05-01 21:20:30 +0000
committerSimon Howard2010-05-01 21:20:30 +0000
commitda43e27597e40f5a298ed5c4ae785cc1b36510d4 (patch)
tree7bd57a534f9f036695fa0e69136ed8e44dd74cca /src/deh_main.h
parent928963656d68dbface669773eecfb6b22ba15da5 (diff)
downloadchocolate-doom-da43e27597e40f5a298ed5c4ae785cc1b36510d4.tar.gz
chocolate-doom-da43e27597e40f5a298ed5c4ae785cc1b36510d4.tar.bz2
chocolate-doom-da43e27597e40f5a298ed5c4ae785cc1b36510d4.zip
Silence printf(DEH_String(...)) warnings, by providing a DEH_printf
function that checks the format string is a valid replacement. Also add DEH_fprintf and DEH_snprintf functions to use throughout the code to do similar checking. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1927
Diffstat (limited to 'src/deh_main.h')
-rw-r--r--src/deh_main.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/deh_main.h b/src/deh_main.h
index 6afe07f3..9248e982 100644
--- a/src/deh_main.h
+++ b/src/deh_main.h
@@ -27,6 +27,8 @@
#ifndef DEH_MAIN_H
#define DEH_MAIN_H
+#include <stdio.h>
+
#include "doomtype.h"
#include "doomfeatures.h"
#include "md5.h"
@@ -52,10 +54,16 @@ void DEH_Checksum(md5_digest_t digest);
#ifdef FEATURE_DEHACKED
char *DEH_String(char *s);
+void DEH_printf(char *fmt, ...);
+void DEH_fprintf(FILE *fstream, char *fmt, ...);
+void DEH_snprintf(char *buffer, size_t len, char *fmt, ...);
#else
#define DEH_String(x) (x)
+#define DEH_printf printf
+#define DEH_fprintf fprintf
+#define DEH_snprintf snprintf
#endif