about summary refs log tree commit diff
path: root/converter/other
diff options
context:
space:
mode:
Diffstat (limited to 'converter/other')
-rw-r--r--converter/other/fiasco/codec/decoder.c24
-rw-r--r--converter/other/fiasco/config.h4
-rw-r--r--converter/other/fiasco/lib/dither.c9
-rw-r--r--converter/other/fiasco/lib/rpf.c7
-rw-r--r--converter/other/pamtosvg/vector.c1
-rw-r--r--converter/other/pamtouil.c2
6 files changed, 23 insertions, 24 deletions
diff --git a/converter/other/fiasco/codec/decoder.c b/converter/other/fiasco/codec/decoder.c
index 9474c1e7..c3982617 100644
--- a/converter/other/fiasco/codec/decoder.c
+++ b/converter/other/fiasco/codec/decoder.c
@@ -1271,28 +1271,28 @@ compute_state_images (unsigned max_level, word_t **simg,
  			      {
 				 int tmp; /* temp. value of adjacent pixels */
 #ifdef HAVE_SIGNED_SHIFT
-#	ifndef WORDS_BIGENDIAN
+#	if BYTE_ORDER == LITTLE_ENDIAN
                                  tmp = (((weight * (int) src [1]) >> 10) << 17)
 				       | (((weight * (int) src [0]) >> 9)
 					  & 0xfffe);
-#	else /* not WORDS_BIGENDIAN */
+#	else
                                  tmp = (((weight * (int) src [0]) >> 10) << 17)
 				       | (((weight * (int) src [1]) >> 9)
 					  & 0xfffe);
-#	endif /* not WORDS_BIGENDIAN */
+#	endif
 #else /* not HAVE_SIGNED_SHIFT */
-#	ifndef WORDS_BIGENDIAN
+#	if BYTE_ORDER == LITTLE_ENDIAN
                                  tmp = (((weight * (int) src [1]) / 1024)
 					* 131072)
 				       | (((weight * (int) src [0])/ 512)
 					  & 0xfffe);
-#	else /* not WORDS_BIGENDIAN */
+#	else
                                  tmp = (((weight * (int) src [0]) / 1024)
 					* 131072)
 				       | (((weight * (int) src [1]) / 512)
 					  & 0xfffe);
 #	endif /* not WORDS_BIGENDIAN */
-#endif /* not HAVE_SIGNED_SHIFT */
+#endif
 				 src    +=  2;
 				 *idst++ = tmp & 0xfffefffe;
 			      }
@@ -1415,28 +1415,28 @@ compute_state_images (unsigned max_level, word_t **simg,
  			      {
 				 int tmp; /* temp. value of adjacent pixels */
 #ifdef HAVE_SIGNED_SHIFT
-#	ifndef WORDS_BIGENDIAN
+#	if BYTE_ORDER == LITTLE_ENDIAN
                                  tmp = (((weight * (int) src [1]) >> 10) << 17)
 				       | (((weight * (int) src [0]) >> 9)
 					  & 0xfffe);
-#	else /* not WORDS_BIGENDIAN */
+#	else
                                  tmp = (((weight * (int)src [0]) >> 10) << 17)
 				       | (((weight * (int)src [1]) >> 9)
 					  & 0xfffe);
-#	endif /* not WORDS_BIGENDIAN */
+#	endif
 #else /* not HAVE_SIGNED_SHIFT */
-#	ifndef WORDS_BIGENDIAN
+#	if BYTE_ORDER == LITTLE_ENDIAN
                                  tmp = (((weight * (int) src [1]) / 1024)
 					* 131072)
 				       | (((weight * (int) src [0])/ 512)
 					  & 0xfffe);
-#	else /* not WORDS_BIGENDIAN */
+#	else
                                  tmp = (((weight * (int) src [0]) / 1024)
 					* 131072)
 				       | (((weight * (int) src [1])/ 512)
 					  & 0xfffe);
 #	endif /* not WORDS_BIGENDIAN */
-#endif /* not HAVE_SIGNED_SHIFT */
+#endif
 				 src +=  2;
 				 *idst = (*idst + tmp) & 0xfffefffe;
 				 idst++;
diff --git a/converter/other/fiasco/config.h b/converter/other/fiasco/config.h
index d6b15a84..64b905f8 100644
--- a/converter/other/fiasco/config.h
+++ b/converter/other/fiasco/config.h
@@ -21,10 +21,6 @@
 /* Define if you can safely include both <sys/time.h> and <time.h>.  */
 #define TIME_WITH_SYS_TIME 1
 
-/* Define if your processor stores words with the most significant
-   byte first (like Motorola and SPARC, unlike Intel and VAX).  */
-/* #undef WORDS_BIGENDIAN */
-
 /* Define if the X Window System is missing or not being used.  */
 #define X_DISPLAY_MISSING 1
 
diff --git a/converter/other/fiasco/lib/dither.c b/converter/other/fiasco/lib/dither.c
index c7f9ebab..a39afa3c 100644
--- a/converter/other/fiasco/lib/dither.c
+++ b/converter/other/fiasco/lib/dither.c
@@ -35,6 +35,7 @@
  *  $State: Exp $
  */
 
+#include "pm_config.h"
 #include "config.h"
 
 #if HAVE_STRING_H
@@ -665,15 +666,15 @@ display_16_bit (const struct fiasco_renderer *this, unsigned char *ximage,
 	 
 	 for (n = image->width * image->height / 2; n; n--, src += 2)
 #ifdef HAVE_SIGNED_SHIFT
-#	ifndef WORDS_BIGENDIAN
+#	if BYTE_ORDER == LITTLE_ENDIAN
 	    *dst++ = (y_table [src [1] >> 4] << 16) | y_table [src [0] >> 4];
-#	else /* not WORDS_BIGENDIAN  */
+#	else
 	    *dst++ = (y_table [src [0] >> 4] << 16) | y_table [src [1] >> 4];
 #	endif
 #else /* not HAVE_SIGNED_SHIFT */
-#	ifndef WORDS_BIGENDIAN
+#	if BYTE_ORDER == LITTLE_ENDIAN
 	    *dst++ = (y_table [src [1] / 16] << 16) | y_table [src [0] / 16];
-#	else /* not WORDS_BIGENDIAN  */
+#	else
 	    *dst++ = (y_table [src [0] / 16] << 16) | y_table [src [1] / 16];
 #	endif
 #endif /* not HAVE_SIGNED_SHIFT */
diff --git a/converter/other/fiasco/lib/rpf.c b/converter/other/fiasco/lib/rpf.c
index ac7d48ca..84c1f9b6 100644
--- a/converter/other/fiasco/lib/rpf.c
+++ b/converter/other/fiasco/lib/rpf.c
@@ -16,6 +16,7 @@
  *  $State: Exp $
  */
 
+#include "pm_config.h"
 #include "config.h"
 
 #include "types.h"
@@ -30,7 +31,7 @@
  *          or all following code is void!
  */
 
-#ifdef WORDS_BIGENDIAN
+#if BYTE_ORDER == BIG_ENDIAN
 /*
  *  Big-Endian Architecture (e.g. SUN, Motorola)
  *  Memory representation of integer 0x00112233 is 00,11,22,33
@@ -38,7 +39,7 @@
 
 enum real_bytes {BYTE_0, BYTE_1, BYTE_2, BYTE_3};
 
-#else  /* not WORDS_BIGENDIAN */
+#else
 /*
  *  Little-Endian Architecture (e.g. Intel, VAX, Alpha)
  *  Memory representation of integer 0x00112233 is 33,22,11,00
@@ -46,7 +47,7 @@ enum real_bytes {BYTE_0, BYTE_1, BYTE_2, BYTE_3};
 
 enum real_bytes {BYTE_3, BYTE_2, BYTE_1, BYTE_0};
 
-#endif /* not WORDS_BIGENDIAN */
+#endif
 
 const int RPF_ZERO = -1;
 
diff --git a/converter/other/pamtosvg/vector.c b/converter/other/pamtosvg/vector.c
index e25c1068..fe1b965c 100644
--- a/converter/other/pamtosvg/vector.c
+++ b/converter/other/pamtosvg/vector.c
@@ -39,6 +39,7 @@ vector_to_point(vector_type const v) {
 
     coord.x = v.dx;
     coord.y = v.dy;
+    coord.z = v.dz
 
     return coord;
 }
diff --git a/converter/other/pamtouil.c b/converter/other/pamtouil.c
index 209ebf16..1a53be0f 100644
--- a/converter/other/pamtouil.c
+++ b/converter/other/pamtouil.c
@@ -97,7 +97,7 @@ parseCommandLine(int argc, char ** argv,
 
         /* Remove trailing "_icon" */
         barPos = strrchr(cmdlineP->outname, '_');
-        if (streq(barPos, "_icon")) 
+        if (barPos && streq(barPos, "_icon")) 
             *barPos = '\0';
     } else {
         if (streq(cmdlineP->inputFilespec, "-"))