fix for compile-time problems
authorkramm <kramm>
Wed, 12 Dec 2007 10:00:32 +0000 (10:00 +0000)
committerkramm <kramm>
Wed, 12 Dec 2007 10:00:32 +0000 (10:00 +0000)
config.h.in
configure
configure.in
lib/Makefile.in
lib/bitio.c
lib/devices/artsutils.h
lib/devices/file.c
lib/devices/text.c
src/Makefile.in

index f1b5ab1..b468b28 100644 (file)
@@ -83,6 +83,9 @@
 /* Define if you have the <sys/ndir.h> header file.  */
 #undef HAVE_SYS_NDIR_H
 
+/* Define if you have the <sys/io.h> header file.  */
+#undef HAVE_IO_H
+
 /* Define if you have the <sys/bsdtypes.h> header file.  */
 #undef HAVE_SYS_BSDTYPES_H
 
index b2bb9c2..8867e78 100755 (executable)
--- a/configure
+++ b/configure
@@ -1774,7 +1774,7 @@ fi
 
 
 PACKAGE=swftools
-VERSION=2007-12-09-2003
+VERSION=2007-04-28-2027
 
 
 # ------------------------------------------------------------------
@@ -5234,7 +5234,8 @@ done
 
 
 
-for ac_header in zlib.h gif_lib.h jpeglib.h assert.h signal.h pthread.h sys/stat.h sys/types.h dirent.h sys/bsdtypes.h sys/ndir.h sys/dir.h ndir.h time.h
+
+for ac_header in zlib.h gif_lib.h io.h jpeglib.h assert.h signal.h pthread.h sys/stat.h sys/types.h dirent.h sys/bsdtypes.h sys/ndir.h sys/dir.h ndir.h time.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
index b1d1ba1..e3896c9 100644 (file)
@@ -229,7 +229,7 @@ dnl Checks for header files.
  AC_CONFIG_HEADER(config.h)
  AC_HEADER_DIRENT
  AC_HEADER_STDC
- AC_CHECK_HEADERS(zlib.h gif_lib.h jpeglib.h assert.h signal.h pthread.h sys/stat.h sys/types.h dirent.h sys/bsdtypes.h sys/ndir.h sys/dir.h ndir.h time.h)
+ AC_CHECK_HEADERS(zlib.h gif_lib.h io.h jpeglib.h assert.h signal.h pthread.h sys/stat.h sys/types.h dirent.h sys/bsdtypes.h sys/ndir.h sys/dir.h ndir.h time.h)
 
 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
index 451ead3..109efd9 100644 (file)
@@ -3,7 +3,7 @@ srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 include ../Makefile.common
 
-DEVICES = devices/swf.$(O) devices/arts.$(O) #devices/lrf.$(O) devices/opengl.$(O)
+DEVICES = devices/swf.$(O) devices/arts.$(O) devices/artsutils.$(O) #devices/lrf.$(O) devices/opengl.$(O)
 
 all: librfxswf$(A) libpdf$(A) art/libart$(A) libbase$(A) libgfx$(A) $(DEVICES)
 
@@ -73,8 +73,10 @@ devices/render.$(O):  devices/render.c devices/render.h
        $(C) devices/render.c -o devices/render.$(O)
 devices/opengl.$(O):  devices/opengl.c devices/opengl.h
        $(C) devices/opengl.c -o devices/opengl.$(O)
-devices/arts.$(O):  devices/arts.c devices/arts.h devices/artsutils.c
+devices/arts.$(O):  devices/arts.c devices/arts.h devices/artsutils.h
        $(C) devices/arts.c -o devices/arts.$(O)
+devices/artsutils.$(O):  devices/artsutils.c devices/artsutils.h
+       $(C) devices/artsutils.c -o devices/artsutils.$(O)
 devices/record.$(O):  devices/record.c devices/record.h
        $(C) devices/record.c -o devices/record.$(O)
 devices/text.$(O):  devices/text.c devices/text.h
index 90c3fe6..0ea2967 100644 (file)
@@ -149,7 +149,7 @@ static void writer_memwrite_finish(writer_t*w)
 void writer_init_memwriter(writer_t*w, void*data, int len)
 {
     struct memwrite_t *mr;
-    mr = (memwrite_t *)malloc(sizeof(struct memwrite_t));
+    mr = (struct memwrite_t*)malloc(sizeof(struct memwrite_t));
     mr->data = (unsigned char *)data;
     mr->length = len;
     memset(w, 0, sizeof(writer_t));
index 0375b82..640527f 100644 (file)
@@ -4,6 +4,10 @@
 #include "../../config.h"
 #include "../art/libart.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 ArtVpath* gfxline_to_ArtVpath(gfxline_t*line);
 ArtSVP* gfxfillToSVP(gfxline_t*line, int perturb);
 void show_path(ArtSVP*path);
@@ -11,4 +15,8 @@ ArtSVP* boxToSVP(double x1, double y1,double x2, double y2);
 ArtSVP* gfxstrokeToSVP(gfxline_t*line, gfxcoord_t width, gfx_capType cap_style, gfx_joinType joint_style, double miterLimit);
 gfxline_t* SVPtogfxline(ArtSVP*svp);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
index 70d1979..288a0a7 100644 (file)
@@ -138,7 +138,7 @@ void fileresult_destroy(struct _gfxresult*gfx)
     free(i->filename);i->filename = 0;
 }
 
-int fileresult_save(struct _gfxresult*gfx, char*filename)
+int fileresult_save(struct _gfxresult*gfx, const char*filename)
 {
     gfxresult_internal_t*i = (gfxresult_internal_t*)gfx->internal;
     FILE*fi,*fo;
@@ -168,7 +168,7 @@ int fileresult_save(struct _gfxresult*gfx, char*filename)
     return 0;
 }
 
-void* fileresult_get(struct _gfxresult*gfx, char*name)
+void* fileresult_get(struct _gfxresult*gfx, const char*name)
 {
     return 0; 
 }
index 36c0e4f..4bdcdaf 100644 (file)
@@ -147,7 +147,7 @@ void text_result_write(gfxresult_t*r, int filedesc)
 {
     textpage_t*i= (textpage_t*)r->internal;
 }
-int text_result_save(gfxresult_t*r, char*filename)
+int text_result_save(gfxresult_t*r, const char*filename)
 {
     textpage_t*i= (textpage_t*)r->internal;
     if(!i) {
@@ -163,7 +163,7 @@ int text_result_save(gfxresult_t*r, char*filename)
     fclose(fi);
     return 1;
 }
-void*text_result_get(gfxresult_t*r, char*name)
+void*text_result_get(gfxresult_t*r, const char*name)
 {
     textpage_t*i= (textpage_t*)r->internal;
     if(!strcmp(name,"text")) {
index 8fe1291..78d59e8 100644 (file)
@@ -93,7 +93,7 @@ swfrender$(E): swfrender.$(O) ../lib/librfxswf$(A) ../lib/libgfx$(A) ../lib/swf/
        $(L) swfrender.$(O) -o $@ ../lib/librfxswf$(A) ../lib/libgfx$(A) ../lib/swf/swf.$(O) ../lib/libbase$(A) $(LIBS) 
        $(STRIP) $@
 
-PDF2SWF_OBJ=../lib/librfxswf$(A) ../lib/libpdf$(A) ../lib/devices/arts.$(O) ../lib/devices/swf.$(O) ../lib/art/libart$(A) ../lib/libgfx$(A) ../lib/libbase$(A)
+PDF2SWF_OBJ=../lib/librfxswf$(A) ../lib/libpdf$(A) ../lib/devices/arts.$(O) ../lib/devices/artsutils.$(O) ../lib/devices/swf.$(O) ../lib/art/libart$(A) ../lib/libgfx$(A) ../lib/libbase$(A)
 pdf2swf$(E): pdf2swf.$(O) $(PDF2SWF_OBJ)
        $(LL) pdf2swf.$(O) -o $@ $(PDF2SWF_OBJ) $(LIBS) $(CXXLIBS)
        $(STRIP) $@