*** ./fitz/filt_faxd.c.ORIG Thu Sep 3 16:47:34 2009 --- ./fitz/filt_faxd.c Thu Sep 3 16:47:41 2009 *************** *** 425,432 **** if (fax->blackis1) memcpy(out->wp, fax->dst, fax->stride); else { ! unsigned char * restrict d = out->wp; ! unsigned char * restrict s = fax->dst; unsigned w = fax->stride; for (i = 0; i < w; i++) *d++ = *s++ ^ 0xff; --- 425,432 ---- if (fax->blackis1) memcpy(out->wp, fax->dst, fax->stride); else { ! unsigned char * d = out->wp; ! unsigned char * s = fax->dst; unsigned w = fax->stride; for (i = 0; i < w; i++) *d++ = *s++ ^ 0xff; *** ./fitz/fitz_base.h.ORIG Thu Sep 3 17:07:57 2009 --- ./fitz/fitz_base.h Thu Sep 3 17:08:21 2009 *************** *** 83,88 **** --- 83,94 ---- #endif + #ifdef _AIX + #ifndef va_copy + #define va_copy(a,b) (a) = (b) + #endif + #endif + /* * CPU detection and flags */ *** ./fitzdraw/porterduff.c.ORIG Thu Sep 3 16:48:10 2009 --- ./fitzdraw/porterduff.c Thu Sep 3 16:49:04 2009 *************** *** 10,16 **** /* dst = src over dst */ static void ! duff_non(byte * restrict sp0, int sw, int sn, byte * restrict dp0, int dw, int w0, int h) { int k; while (h--) --- 10,16 ---- /* dst = src over dst */ static void ! duff_non(byte * sp0, int sw, int sn, byte * dp0, int dw, int w0, int h) { int k; while (h--) *************** *** 36,42 **** /* dst = src in msk */ static void ! duff_nimcn(byte * restrict sp0, int sw, int sn, byte * restrict mp0, int mw, int mn, byte * restrict dp0, int dw, int w0, int h) { int k; while (h--) --- 36,42 ---- /* dst = src in msk */ static void ! duff_nimcn(byte * sp0, int sw, int sn, byte * mp0, int mw, int mn, byte * dp0, int dw, int w0, int h) { int k; while (h--) *************** *** 62,68 **** /* dst = src in msk over dst */ static void ! duff_nimon(byte * restrict sp0, int sw, int sn, byte * restrict mp0, int mw, int mn, byte * restrict dp0, int dw, int w0, int h) { int k; while (h--) --- 62,68 ---- /* dst = src in msk over dst */ static void ! duff_nimon(byte * sp0, int sw, int sn, byte * mp0, int mw, int mn, byte * dp0, int dw, int w0, int h) { int k; while (h--) *************** *** 91,97 **** } } ! static void duff_1o1(byte * restrict sp0, int sw, byte * restrict dp0, int dw, int w0, int h) { /* duff_non(sp0, sw, 1, dp0, dw, w0, h); */ while (h--) --- 91,97 ---- } } ! static void duff_1o1(byte * sp0, int sw, byte * dp0, int dw, int w0, int h) { /* duff_non(sp0, sw, 1, dp0, dw, w0, h); */ while (h--) *************** *** 133,139 **** } } ! static void duff_1i1c1(byte * restrict sp0, int sw, byte * restrict mp0, int mw, byte * restrict dp0, int dw, int w0, int h) { /* duff_nimcn(sp0, sw, 1, mp0, mw, 1, dp0, dw, w0, h); */ while (h--) --- 133,139 ---- } } ! static void duff_1i1c1(byte * sp0, int sw, byte * mp0, int mw, byte * dp0, int dw, int w0, int h) { /* duff_nimcn(sp0, sw, 1, mp0, mw, 1, dp0, dw, w0, h); */ while (h--) *************** *** 155,161 **** } } ! static void duff_4i1c4(byte * restrict sp0, int sw, byte * restrict mp0, int mw, byte * restrict dp0, int dw, int w0, int h) { /* duff_nimcn(sp0, sw, 4, mp0, mw, 1, dp0, dw, w0, h); */ while (h--) --- 155,161 ---- } } ! static void duff_4i1c4(byte * sp0, int sw, byte * mp0, int mw, byte * dp0, int dw, int w0, int h) { /* duff_nimcn(sp0, sw, 4, mp0, mw, 1, dp0, dw, w0, h); */ while (h--) *************** *** 181,187 **** } } ! static void duff_1i1o1(byte * restrict sp0, int sw, byte * restrict mp0, int mw, byte * restrict dp0, int dw, int w0, int h) { /* duff_nimon(sp0, sw, 1, mp0, mw, 1, dp0, dw, w0, h); */ while (h--) --- 181,187 ---- } } ! static void duff_1i1o1(byte * sp0, int sw, byte * mp0, int mw, byte * dp0, int dw, int w0, int h) { /* duff_nimon(sp0, sw, 1, mp0, mw, 1, dp0, dw, w0, h); */ while (h--) *************** *** 206,212 **** } } ! static void duff_4i1o4(byte * restrict sp0, int sw, byte * restrict mp0, int mw, byte * restrict dp0, int dw, int w0, int h) { /* duff_nimon(sp0, sw, 4, mp0, mw, 1, dp0, dw, w0, h); */ while (h--) --- 206,212 ---- } } ! static void duff_4i1o4(byte * sp0, int sw, byte * mp0, int mw, byte * dp0, int dw, int w0, int h) { /* duff_nimon(sp0, sw, 4, mp0, mw, 1, dp0, dw, w0, h); */ while (h--) *************** *** 238,244 **** * Path and text masks */ ! static void path_1c1(byte * restrict src, byte cov, int len, byte * restrict dst) { while (len--) { --- 238,244 ---- * Path and text masks */ ! static void path_1c1(byte * src, byte cov, int len, byte * dst) { while (len--) { *************** *** 247,253 **** } } ! static void path_1o1(byte * restrict src, byte cov, int len, byte * restrict dst) { while (len--) { --- 247,253 ---- } } ! static void path_1o1(byte * src, byte cov, int len, byte * dst) { while (len--) { *************** *** 258,264 **** } // With 4 In 1 Over 4 ! static void path_w4i1o4(byte * restrict argb, byte * restrict src, byte cov, int len, byte * restrict dst) { byte alpha = argb[0]; byte r = argb[4]; --- 258,264 ---- } // With 4 In 1 Over 4 ! static void path_w4i1o4(byte * argb, byte * src, byte cov, int len, byte * dst) { byte alpha = argb[0]; byte r = argb[4]; *************** *** 277,288 **** } } ! static void text_1c1(byte * restrict src0, int srcw, byte * restrict dst0, int dstw, int w0, int h) { while (h--) { ! byte * restrict src = src0; ! byte * restrict dst = dst0; int w = w0; while (w--) { --- 277,288 ---- } } ! static void text_1c1(byte * src0, int srcw, byte * dst0, int dstw, int w0, int h) { while (h--) { ! byte * src = src0; ! byte * dst = dst0; int w = w0; while (w--) { *************** *** 293,299 **** } } ! static void text_1o1(byte * restrict src0, int srcw, byte * restrict dst0, int dstw, int w0, int h) { while (h--) { --- 293,299 ---- } } ! static void text_1o1(byte * src0, int srcw, byte * dst0, int dstw, int w0, int h) { while (h--) { *************** *** 311,317 **** } } ! static void text_w4i1o4(byte * restrict argb, byte * restrict src0, int srcw, byte * restrict dst0, int dstw, int w0, int h) { unsigned char alpha = argb[0]; unsigned char r = argb[4]; --- 311,317 ---- } } ! static void text_w4i1o4(byte * argb, byte * src0, int srcw, byte * dst0, int dstw, int w0, int h) { unsigned char alpha = argb[0]; unsigned char r = argb[4]; *** ./fitzdraw/imageunpack.c.ORIG Thu Sep 3 16:49:16 2009 --- ./fitzdraw/imageunpack.c Thu Sep 3 16:49:30 2009 *************** *** 122,128 **** inited = 1; } ! static void loadtile1(byte * restrict src, int sw, byte * restrict dst, int dw, int w, int h, int pad) { byte *sp; byte *dp; --- 122,128 ---- inited = 1; } ! static void loadtile1(byte * src, int sw, byte * dst, int dw, int w, int h, int pad) { byte *sp; byte *dp; *************** *** 218,228 **** } \ } ! static void loadtile2(byte * restrict src, int sw, byte * restrict dst, int dw, int w, int h, int pad) TILE(ttwo) ! static void loadtile4(byte * restrict src, int sw, byte * restrict dst, int dw, int w, int h, int pad) TILE(tnib) ! static void loadtile8(byte * restrict src, int sw, byte * restrict dst, int dw, int w, int h, int pad) TILE(toct) void (*fz_decodetile)(fz_pixmap *pix, int skip, float *decode) = decodetile; --- 218,228 ---- } \ } ! static void loadtile2(byte * src, int sw, byte * dst, int dw, int w, int h, int pad) TILE(ttwo) ! static void loadtile4(byte * src, int sw, byte * dst, int dw, int w, int h, int pad) TILE(tnib) ! static void loadtile8(byte * src, int sw, byte * dst, int dw, int w, int h, int pad) TILE(toct) void (*fz_decodetile)(fz_pixmap *pix, int skip, float *decode) = decodetile; *** ./fitzdraw/imagescale.c.ORIG Thu Sep 3 16:49:42 2009 --- ./fitzdraw/imagescale.c Thu Sep 3 16:49:56 2009 *************** *** 4,10 **** typedef unsigned char byte; ! static inline void srown(byte * restrict src, byte * restrict dst, int w, int denom, int n) { int invdenom = (1<<16) / denom; int x, left, k; --- 4,10 ---- typedef unsigned char byte; ! static inline void srown(byte * src, byte * dst, int w, int denom, int n) { int invdenom = (1<<16) / denom; int x, left, k; *************** *** 37,43 **** } /* special-case common 1-5 components - the compiler optimizes this */ ! static inline void srowc(byte * restrict src, byte * restrict dst, int w, int denom, int n) { int invdenom = (1<<16) / denom; int x, left; --- 37,43 ---- } /* special-case common 1-5 components - the compiler optimizes this */ ! static inline void srowc(byte * src, byte * dst, int w, int denom, int n) { int invdenom = (1<<16) / denom; int x, left; *************** *** 126,132 **** srowc(src, dst, w, denom, 5); } ! static inline void scoln(byte * restrict src, byte * restrict dst, int w, int denom, int n) { int invdenom = (1<<16) / denom; int x, y, k; --- 126,132 ---- srowc(src, dst, w, denom, 5); } ! static inline void scoln(byte * src, byte * dst, int w, int denom, int n) { int invdenom = (1<<16) / denom; int x, y, k; *** ./Jamrules.ORIG Thu Sep 3 16:42:20 2009 --- ./Jamrules Thu Sep 3 16:51:52 2009 *************** *** 47,52 **** --- 47,72 ---- if $(HAVE_JASPER) { DEFINES += HAVE_JASPER ; } if $(HAVE_OPENJPEG) { DEFINES += HAVE_OPENJPEG ; } + if $(OS) = AIX + { + Echo Building for AIX ; + + BUILD_X11APP = true ; + + CC = xlc ; + CCFLAGS = -I/opt/freeware/include -I/opt/freeware/include/freetype2 ; + LINKFLAGS = -L/opt/freeware/lib ; + LINKLIBS = -lfreetype -ljpeg -lz -lm ; + APPLINKLIBS = -lX11 -lXext -lpthread ; + + if $(BUILD) = debug { OPTIM = -g ; } + if $(BUILD) = release { OPTIM = -O ; } + + if $(HAVE_JBIG2DEC) { LINKLIBS += -ljbig2dec ; } + if $(HAVE_JASPER) { LINKLIBS += -ljasper ; } + if $(HAVE_OPENJPEG) { LINKLIBS += -lopenjpeg ; } + } + if $(OS) = LINUX { Echo Building for LINUX ;