Code

optimize includes, use stdlib instead of inttypes if we have it
authorrwst <rwst@users.sourceforge.net>
Sat, 4 Feb 2006 09:52:07 +0000 (09:52 +0000)
committerrwst <rwst@users.sourceforge.net>
Sat, 4 Feb 2006 09:52:07 +0000 (09:52 +0000)
src/inkjar/jar.h
src/livarot/AlphaLigne.cpp
src/livarot/AlphaLigne.h
src/livarot/BitLigne.cpp
src/livarot/BitLigne.h
src/livarot/LivarotDefs.h
src/livarot/MyMath.h
src/livarot/Shape.h

index 2340a74c72b8758cdd04796021a777049c0e299a..04abdd80131f4c5fad0045db7b2e72542cfc211a 100644 (file)
@@ -6,10 +6,22 @@
  * Released under GNU GPL, read the file 'COPYING' for more information
  */
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#ifdef HAVE_ZLIB_H
+# include <zlib.h>
+#endif
+
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#else
+# include <inttypes.h>
+#endif
+
 #include <glib/garray.h>
 #include <glib/gtypes.h>
-#include <zlib.h>
-#include <inttypes.h>
 
 namespace Inkjar {
 
index fa128e1a7b7ff68058dbbc5272200977170c3a7d..f878c1bb3cc8d708c73f94fea81b8a1376b01ba1 100644 (file)
@@ -8,9 +8,10 @@
  */
 
 #include "AlphaLigne.h"
-//#include "Buffer.h"
 
 #include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
 #include <glib/gmem.h>
 
 AlphaLigne::AlphaLigne(int iMin,int iMax)
index b2686f6ba736f2afcb8f8c5d36bb8a0bb4a1dc1c..d6684e0cf55d82d685f8decc6655b51036246b8a 100644 (file)
 #ifndef my_alpha_ligne
 #define my_alpha_ligne
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-#include <string.h>
-//#include <iostream.h>
-
 #include "LivarotDefs.h"
 
 /*
index 52870f699b9200195e3c81f929b68c90d94069e7..d6196d29e7135e6c76f9604466116f14f06f0b39 100644 (file)
@@ -10,6 +10,8 @@
 #include "BitLigne.h"
 
 #include <math.h>
+#include <stdio.h>
+#include <string.h>
 #include <glib/gmem.h>
 
 BitLigne::BitLigne(int ist,int ien,float iScale)
index a1d5265f04c7cf9cf2e0d2edd7d1a82df0118772..0bdb3a80ef39112552c7e0eb438fb2a0affa0e5a 100644 (file)
 #ifndef my_bit_ligne
 #define my_bit_ligne
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-#include <string.h>
-
 #include "LivarotDefs.h"
 
 /*
index bdb50b56376334bf4aac351ec18fc78510edf125..3e59cdab377e19d3bcaa1e41e30e65f5a5fca40e 100644 (file)
@@ -8,7 +8,16 @@
 
 #ifndef my_defs
 #define my_defs
-#include <inttypes.h>
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#else
+# include <inttypes.h>
+#endif
 
 // error codes (mostly obsolete)
 enum
index 27e8089eccbd68b7a8d48168aebda1966b5a820c..371102f745ef532ca31e680324f75a7e3973aceb 100644 (file)
@@ -9,12 +9,19 @@
 #ifndef my_math
 #define my_math
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-#include <string.h>
-//#include <iostream.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#else
+# include <inttypes.h>
+#endif
 
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
 
 typedef struct vec2
 {
index dad27e17b08ff79a4fe942e58a40364dce91656f..d0be5e44e04f26ca9bd6c06c75d1dc58cdb28eb6 100644 (file)
@@ -12,7 +12,6 @@
 #include <cmath>
 #include <cstdio>
 #include <cstdlib>
-#include <inttypes.h>
 #include <cstring>
 #include <vector>