pkgsrc/graphics/jpeg_ls/patches/patch-ad
joerg 4b260f490e stdout can not be used to initialise a global variable.. Move it from
global scope to static scope in encoder.c / decoder.c and initialise it
from main.
Fix a nice side-effect from a macro, which is not a macro in DragonFly:
	if feof(tablefile)
does not parse correctly.
2005-12-30 23:23:54 +00:00

40 lines
1.1 KiB
Text

$NetBSD: patch-ad,v 1.2 2005/12/30 23:23:54 joerg Exp $
--- Encoder/global.h.orig Tue Jun 22 20:14:15 1999
+++ Encoder/global.h
@@ -97,8 +97,6 @@ extern char *plane_int_string,
*pixel_int_string;
-#define BIG_ENDIAN 1
-
typedef struct jpeg_ls {
int columns, /* The number of columns */
@@ -300,7 +298,7 @@ typedef unsigned short pixel;
/****** Global variables prototypes */
-extern FILE *in, *out, *msgfile;
+extern FILE *in, *out;
extern FILE *c_in[MAX_COMPONENTS];
extern FILE *c_out[MAX_COMPONENTS];
extern int inhandle;
@@ -318,7 +316,7 @@ extern int alpha;
extern int vLUT[3][2 * LUTMAX16];
extern int lutmax;
extern int classmap[CONTEXTS1];
-extern int *qdiv0, *qdiv, /* quantization table (division via look-up) */
+extern int *qdiv0, *qdiv1, /* quantization table (division via look-up) */
*qmul0, *qmul; /* dequantization table */
/* statistics tables */
@@ -365,7 +363,7 @@ void init_stats(int);
-#ifdef BIG_ENDIAN
+#ifdef NEVER_ASSUME_BIG_ENDIAN
# define ENDIAN8(x) (x)
# define ENDIAN16(x) (x)
#else