changeset 124:d5cfd29c87c4

Rename some conditional compilation directives.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 04 Oct 2012 05:37:26 +0300
parents 6f7356f3b91c
children 5102ec9e9bce
files Makefile.gen config.mak.in dmres.c dmres.h
diffstat 4 files changed, 21 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.gen	Thu Oct 04 05:37:03 2012 +0300
+++ b/Makefile.gen	Thu Oct 04 05:37:26 2012 +0300
@@ -39,8 +39,8 @@
 ###
 ### Filesystem
 ###
-ifeq ($(DMRES_PACKFS),yes)
-DM_CFLAGS += -DDMRES_PACKFS
+ifeq ($(DM_USE_PACKFS),yes)
+DM_CFLAGS += -DDM_USE_PACKFS
 DMLIB_OBJS += dmpack.o dmpackutil.o
 DM_LDFLAGS += -lz
 ifeq ($(DM_BUILD_TOOLS),yes)
@@ -48,8 +48,8 @@
 endif
 endif
 
-ifeq ($(DMRES_STDIO),yes)
-DM_CFLAGS += -DDMRES_STDIO
+ifeq ($(DM_USE_STDIO),yes)
+DM_CFLAGS += -DDM_USE_STDIO
 endif
 
 
@@ -156,7 +156,7 @@
 
 ### Dependancies
 ifeq ($(DM_BUILD_TOOLS),yes)
-ifeq ($(DMRES_STDIO),yes)
+ifeq ($(DM_USE_STDIO),yes)
 ifeq ($(SUP_MODLOAD),yes)
 BINARIES+= viewmod mod2wav testpl ppl
 endif
--- a/config.mak.in	Thu Oct 04 05:37:03 2012 +0300
+++ b/config.mak.in	Thu Oct 04 05:37:26 2012 +0300
@@ -13,9 +13,9 @@
 DM_USE_SIMD=yes
 
 
-DMRES_PACKFS=yes
-DMRES_STDIO=yes
-DMRES_MEMIO=yes
+DM_RES_PACKFS=yes
+DM_RES_STDIO=yes
+DM_RES_MEMIO=yes
 
 
 DM_GFX_BM_TEXT=yes
--- a/dmres.c	Thu Oct 04 05:37:03 2012 +0300
+++ b/dmres.c	Thu Oct 04 05:37:26 2012 +0300
@@ -7,8 +7,8 @@
 #include "dmres.h"
 #include <time.h>
 
-#if !defined(DMRES_PACKFS) && !defined(DMRES_STDIO)
-#error At least one of DMRES_PACKFS, DMRES_STDIO must be defined.
+#if !defined(DM_USE_PACKFS) && !defined(DM_USE_STDIO)
+#error At least one of DM_USE_PACKFS, DM_USE_STDIO must be defined.
 #endif
 
 #define DMRES_LOCK(x) dmMutexLock(dfResourcesMutex)
@@ -24,7 +24,7 @@
 DMMutex *          dfResourcesMutex = NULL;
 
 
-#ifdef DMRES_PACKFS
+#ifdef DM_USE_PACKFS
 static DMPackFile *dfResPackFile = NULL;
 static char *      dfResPackFilename = NULL;
 #endif
@@ -139,7 +139,7 @@
 }
 
 
-#ifdef DMRES_STDIO
+#ifdef DM_USE_STDIO
 /* Basic stdio file routines
  */
 static int dm_stdio_fopen(DMResource *handle)
@@ -317,7 +317,7 @@
 /*
  * PACK file routines
  */
-#ifdef DMRES_PACKFS
+#ifdef DM_USE_PACKFS
 static int dm_pack_preload(DMResource *handle)
 {
     DMPackEntry *node;
@@ -540,10 +540,10 @@
     // Check fops
     if (handle->fops == NULL)
     {
-#ifdef DMRES_PACKFS
+#ifdef DM_USE_PACKFS
         if (dfResFlags & DRF_USE_PACK)
             handle->fops = &dfPackFileOps;
-#ifdef DMRES_STDIO
+#ifdef DM_USE_STDIO
         else
             handle->fops = &dfStdioFileOps;
 #else
@@ -618,7 +618,7 @@
     // Check master directory for resource
     if ((handle = dmres_find(filename)) == NULL)
     {
-#ifdef DMRES_STDIO
+#ifdef DM_USE_STDIO
         // Hmm.. does not exist? Fall back to a stdio file
         handle = dmres_new(filename, 0, 0);
         if (handle == NULL)
@@ -679,7 +679,7 @@
 }
 
 
-#ifdef DMRES_STDIO
+#ifdef DM_USE_STDIO
 DMResource * dmf_create_stdio(const char *filename, const char *mode)
 {
     DMResource *handle = dmres_new(filename, 0, 0);
@@ -921,7 +921,7 @@
 
     if (flags & DRF_USE_PACK)
     {
-#ifdef DMRES_PACKFS
+#ifdef DM_USE_PACKFS
         int ret;
         DMPackEntry *node;
 
@@ -994,7 +994,7 @@
         return;
     
     // Shutdown possible subsystems
-#ifdef DMRES_PACKFS
+#ifdef DM_USE_PACKFS
     if (dfResFlags & DRF_USE_PACK)
     {
         int res = dm_pack_close(dfResPackFile);
--- a/dmres.h	Thu Oct 04 05:37:03 2012 +0300
+++ b/dmres.h	Thu Oct 04 05:37:26 2012 +0300
@@ -9,7 +9,7 @@
 
 #include "dmlib.h"
 
-#ifdef DMRES_PACKFS
+#ifdef DM_USE_PACKFS
 #include <zlib.h>
 #include "dmpack.h"
 #endif
@@ -127,7 +127,7 @@
 // Opening and closing resources
 DMResource * dmf_open(const char *);
 DMResource * dmf_open_memio(const char *, Uint8 *buf, size_t len);
-#ifdef DMRES_STDIO
+#ifdef DM_USE_STDIO
 DMResource * dmf_create_stdio(const char *filename, const char *mode);
 DMResource * dmf_create_stdio_stream(FILE *);
 #endif