changeset 1881:73545a442ffe

Move dmresw function declarations to dmres.h
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 25 Jun 2018 13:00:40 +0300
parents efe6e88a02f3
children 8e3ebeabb2d9
files Makefile.gen src/dmres.h src/dmresw.c src/dmresw.h src/dmtimelinew.c tools/fontconv.c tools/libgfx.c
diffstat 7 files changed, 16 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.gen	Mon Jun 25 03:07:26 2018 +0300
+++ b/Makefile.gen	Mon Jun 25 13:00:40 2018 +0300
@@ -374,6 +374,10 @@
 	@echo " CC $+"
 	@$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS)
 
+$(OBJPATH)dmresw.o: $(DMLIBSRC)dmresw.c $(DMLIBSRC)dmres.h
+	@echo " CC $+"
+	@$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS)
+
 
 $(OBJPATH)jssmod.o: $(MINIJSS)jssmod.c $(MINIJSS)jssmod.h $(MINIJSS)jss.h
 	@echo " CC $+"
--- a/src/dmres.h	Mon Jun 25 03:07:26 2018 +0300
+++ b/src/dmres.h	Mon Jun 25 13:00:40 2018 +0300
@@ -184,6 +184,16 @@
 
 #undef DM_DEFINE_FFUNC
 
+BOOL         dmf_write_str(DMResource *fh, const void *data, const size_t len);
+BOOL         dmf_write_byte(DMResource *fh, const Uint8 val);
+
+#define DM_DEFINE_FFUNC(xname, xtype, z)          \
+BOOL         dmf_write_ ## xname (DMResource *fh, const xtype v);
+
+#include "dmfiletmpl.h"
+
+#undef DM_DEFINE_FFUNC
+
 
 #ifdef __cplusplus
 }
--- a/src/dmresw.c	Mon Jun 25 03:07:26 2018 +0300
+++ b/src/dmresw.c	Mon Jun 25 13:00:40 2018 +0300
@@ -4,7 +4,7 @@
  * Programmed and designed by Matti 'ccr' Hamalainen
  * (C) Copyright 2011-2015 Tecnic Software productions (TNSP)
  */
-#include "dmresw.h"
+#include "dmres.h"
 
 
 BOOL dmf_write_str(DMResource *fh, const void *data, const size_t len)
--- a/src/dmresw.h	Mon Jun 25 03:07:26 2018 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
- * DMLib
- * -- Resource management write helpers
- * Programmed and designed by Matti 'ccr' Hamalainen
- * (C) Copyright 2011-2015 Tecnic Software productions (TNSP)
- */
-#ifndef DMRESW_H
-#define DMRESW_H
-
-#include "dmres.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-BOOL         dmf_write_str(DMResource *fh, const void *data, const size_t len);
-BOOL         dmf_write_byte(DMResource *fh, const Uint8 val);
-
-#define DM_DEFINE_FFUNC(xname, xtype, z)          \
-BOOL         dmf_write_ ## xname (DMResource *fh, const xtype v);
-
-#include "dmfiletmpl.h"
-
-#undef DM_DEFINE_FFUNC
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // DMRESW_H
--- a/src/dmtimelinew.c	Mon Jun 25 03:07:26 2018 +0300
+++ b/src/dmtimelinew.c	Mon Jun 25 13:00:40 2018 +0300
@@ -5,7 +5,6 @@
  * (C) Copyright 2012-2015 Tecnic Software productions (TNSP)
  */
 #include "dmengine.h"
-#include "dmresw.h"
 
 
 static BOOL dmSaveFloatValue(DMResource *res, DMFloat val)
--- a/tools/fontconv.c	Mon Jun 25 03:07:26 2018 +0300
+++ b/tools/fontconv.c	Mon Jun 25 13:00:40 2018 +0300
@@ -11,7 +11,7 @@
 #include "dmfile.h"
 #include "dmimage.h"
 #include "dmtext.h"
-#include "dmresw.h"
+#include "dmres.h"
 
 char    *optInFilename = NULL, *optOutFilename = NULL;
 
--- a/tools/libgfx.c	Mon Jun 25 03:07:26 2018 +0300
+++ b/tools/libgfx.c	Mon Jun 25 13:00:40 2018 +0300
@@ -6,7 +6,6 @@
  * Please read file 'COPYING' for information on license and distribution.
  */
 #include "libgfx.h"
-#include "dmresw.h"
 
 #ifdef DM_USE_LIBPNG
 #include <png.h>